summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* block: Keep DriveInfo alive until BlockDriverState diesMarkus Armbruster2014-09-255-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the BDS's refcnt > 0, drive_del() destroys the DriveInfo, but not the BDS. This can happen in three places: * Device model destruction during unplug: blockdev_auto_del() * Xen IDE unplug: pci_piix3_xen_ide_unplug() * drive_del command when no device model is attached: do_drive_del() The other callers of drive_del are on error paths where refcnt == 1. If the user somehow manages to plug in a device model using a BDS that has gone through drive_del(), the legacy configuration passed in DriveInfo doesn't reach the device model, and automatic deletion on unplug doesn't work. Worse, some device models such as scsi-disk crash when DriveInfo doesn't exist. This is theoretical; I didn't research an actual reproducer. The problem was introduced when we replaced DriveInfo reference counting by BDS reference counting in commit a94a3fa..fa510eb. Fix by keeping DriveInfo alive until its BDS dies. This affects qemu_drive_opts: now you can't reuse the same ID for new drive options until the BDS dies. Before, you could, but since the code always attempts to create a BDS with the same ID next, the enclosing operation "create a new drive" failed anyway. Different error path, same result. Unfortunately, the fix involves use of blockdev.c stuff from block.c, which is a layering violation. Fortunately, my forthcoming BlockBackend work will get rid of it again. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Benoît Canet <benoit.canet@nodalink.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* blockdev: Disentangle BlockDriverState and DriveInfo creationMarkus Armbruster2014-09-251-17/+20
| | | | | | | | | | | blockdev_init() mixes up BlockDriverState and DriveInfo initialization Finish the BlockDriverState job before starting to mess with DriveInfo. Easier on the eyes. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Benoît Canet <benoit.canet@nodalink.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* blkdebug: show an error for invalid event namesStefan Hajnoczi2014-09-251-3/+19
| | | | | | | | | | | | It is easy to typo a blkdebug configuration and waste a lot of time figuring out why no rules are matching. Push the Error** down into add_rule() so we can report an error when the event name is invalid. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed' into ↵Peter Maydell2014-09-242-137/+596
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | staging tcx: Implement hardware acceleration # gpg: Signature made Tue 23 Sep 2014 22:52:34 BST using RSA key ID AE0F321F # gpg: Can't check signature: public key not found * remotes/mcayland/tags/qemu-sparc-signed: tcx: Implement hardware acceleration Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * tcx: Implement hardware accelerationMark Cave-Ayland2014-09-232-137/+596
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The S24/TCX framebuffer is a mildly accelerated video card with blitter, stippler and hardware cursor. * Solaris and NetBSD 6.x use all the hardware acceleration features * The Xorg driver (used by Linux) can use the hardware cursor only This patch implements hardware acceleration in both 8 bit and 24 bit modes. It is based on the NetBSD driver sources and from tests with Solaris. Signed-off-by: Olivier Danet <odanet@caramail.com> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
* | virtio: Fix wrong type cast from pointer to longStefan Weil2014-09-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compiler warning (w32, w64): include/hw/virtio/virtio_ring.h:142:26: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] When sizeof(long) < sizeof(void *), this is not only a warning but a real program error. Add also missing blanks in the same statement. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 1411536002-14088-1-git-send-email-sw@weilnetz.de Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | Merge remote-tracking branch ↵Peter Maydell2014-09-241-12/+12
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'remotes/awilliam/tags/vfio-pci-for-qemu-20140923.0' into staging Endian updates to re-fix cross endian host and guest and enable the same for ROM loading (Alexey) # gpg: Signature made Tue 23 Sep 2014 18:03:03 BST using RSA key ID 3BB08B22 # gpg: Can't check signature: public key not found * remotes/awilliam/tags/vfio-pci-for-qemu-20140923.0: vfio: make rom read endian sensitive Revert "vfio: Make BARs native endian" Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | vfio: make rom read endian sensitiveNikunj A Dadhania2014-09-221-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All memory regions used by VFIO are LITTLE_ENDIAN and they already take care of endiannes when accessing real device BARs except ROM - it was broken on BE hosts. This fixes endiannes for ROM BARs the same way as it is done for other BARs. This has been tested on PPC64 BE/LE host/guest in all possible combinations including TCG. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> [aik: added commit log] Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
| * | Revert "vfio: Make BARs native endian"Alexey Kardashevskiy2014-09-221-31/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c40708176a6b52b73bec14796b7c71b882ceb102. The resulting code wrongly assumed target and host endianness are the same which is not always the case for PPC64. [aw: or potentially any host supporting VFIO and TCG] Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
* | | slirp: udp: fix NULL pointer dereference because of uninitialized socketPetr Matousek2014-09-231-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When guest sends udp packet with source port and source addr 0, uninitialized socket is picked up when looking for matching and already created udp sockets, and later passed to sosendto() where NULL pointer dereference is hit during so->slirp->vnetwork_mask.s_addr access. Fix this by checking that the socket is not just a socket stub. This is CVE-2014-3640. Signed-off-by: Petr Matousek <pmatouse@redhat.com> Reported-by: Xavier Mehrenberger <xavier.mehrenberger@airbus.com> Reported-by: Stephane Duverger <stephane.duverger@eads.net> Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Message-id: 20140918063537.GX9321@dhcp-25-225.brq.redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20140923-1' into ↵Peter Maydell2014-09-2322-277/+355
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging usb: enable hotplug, switch to realize, ohci tracing, misc fixes. # gpg: Signature made Tue 23 Sep 2014 12:42:29 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-usb-20140923-1: (26 commits) usb: tag standalone ehci as hotpluggable usb: tag standalone uhci as hotpluggable usb: tag xhci as hotpluggable usb-serial: only check speed once at realize time usb-bus: introduce a wrapper function to check speed usb-bus: remove "init" from USBDeviceClass struct usb-mtp: convert init to realize usb-redir: convert init to realize usb-audio: convert init to realize dev-wacom: convert init to realize dev-hid: convert init to realize usb-ccid: convert init to realize dev-serial: convert init to realize dev-bluetooth: convert init to realize dev-uas: using error_report instead of fprintf dev-uas: convert init to realize dev-storage: usring error_report instead of fprintf/printf dev-storage: convert init to realize usb-hub: convert init to realize libusb: using error_report instead of fprintf ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | usb: tag standalone ehci as hotpluggableGerd Hoffmann2014-09-233-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a flag to EHCIPCIInfo saying whenever the controller supports companions or not. Make sure we only allow registering companions for ehci versions supporting that. Enable pci hotplug for the ehci variants not supporting companions. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb: tag standalone uhci as hotpluggableGerd Hoffmann2014-09-231-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | uhci hostadapters in companion setups can't be hotplugged. So leave hotplug disabled for all ich9 variants (which are already tagged with unplug = true in the info struct). For the other variants we'll enable hotplug and remove the companion setup properties. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb: tag xhci as hotpluggableGerd Hoffmann2014-09-231-1/+0
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-serial: only check speed once at realize timeGonglei2014-09-231-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whatever the chardev is open or not, we should assure the speed is matched each other. So, call usb_check_attach() check speed. And then pass &error_abort at all calls to usb_device_attach(). Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-bus: introduce a wrapper function to check speedGonglei2014-09-232-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this way, we can check speed directly, don't need call usb_device_attach(), which has other conditions, such as checking the chardev is open. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-bus: remove "init" from USBDeviceClass structGonglei2014-09-232-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | All usb-bus devices are realized by realize(), remove init callback function from USBDeviceClass struct. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-mtp: convert init to realizeGonglei2014-09-231-3/+2
| | | | | | | | | | | | | | | | | | Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-redir: convert init to realizeGonglei2014-09-231-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | In this way, all the implementations now use error_setg instead of qerror_report for reporting error. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-audio: convert init to realizeGonglei2014-09-231-3/+2
| | | | | | | | | | | | | | | | | | Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | dev-wacom: convert init to realizeGonglei2014-09-231-3/+2
| | | | | | | | | | | | | | | | | | Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | dev-hid: convert init to realizeGonglei2014-09-231-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-ccid: convert init to realizeGonglei2014-09-231-3/+2
| | | | | | | | | | | | | | | | | | Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | dev-serial: convert init to realizeGonglei2014-09-231-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | dev-bluetooth: convert init to realizeGonglei2014-09-231-4/+2
| | | | | | | | | | | | | | | | | | Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | dev-uas: using error_report instead of fprintfGonglei2014-09-231-5/+6
| | | | | | | | | | | | | | | | | | Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | dev-uas: convert init to realizeGonglei2014-09-231-4/+2
| | | | | | | | | | | | | | | | | | Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | dev-storage: usring error_report instead of fprintf/printfGonglei2014-09-231-6/+6
| | | | | | | | | | | | | | | | | | Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | dev-storage: convert init to realizeGonglei2014-09-231-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-hub: convert init to realizeGonglei2014-09-231-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | libusb: using error_report instead of fprintfGonglei2014-09-231-5/+4
| | | | | | | | | | | | | | | | | | Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | libusb: convert init to realizeGonglei2014-09-231-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-net: convert init to realizeGonglei2014-09-231-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | meanwhile, qerror_report_err() is a transitional interface to help with converting existing HMP commands to QMP. It should not be used elsewhere. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-bus: convert USBDeviceClass init to realizeGonglei2014-09-236-50/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "realize/unrealize" in USBDeviceClass, which has errp as a parameter. So all the implementations now use error_setg instead of error_report for reporting error. Note: this patch still keep "init" in USBDeviceClass, and call kclass->init in usb_device_realize(), avoid breaking git bisect. After realize all usb devices, will be removed. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | ohci: Convert fprint/DPRINTF/print to tracesAlexey Kardashevskiy2014-09-232-123/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts many kinds of debug prints to traces. This implements packets logging to avoid unnecessary calculations if usb_ohci_td_pkt_short/usb_ohci_td_pkt_long is not enabled. This makes OHCI errors (such as "DMA error") invisible by default. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-storage: fix possible memory leak and missing error messageGonglei2014-09-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When scsi_bus_legacy_add_drive() return NULL, meanwhile err will be not NULL, which will casue memory leak and missing error message. Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-storage: Fix how legacy init handles option ID clashMarkus Armbruster2014-09-221-2/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | usb_msd_init() calls qemu_opts_create() with a made-up ID and false fail_if_exists. If the ID already exists, it happily messes up those options, then fails drive_new(), because the BlockDriverState with that ID already exists, too. Reproducer: -drive if=none,id=usb0,format=raw -usbdevice disk:tmp.qcow2 Pass true fail_if_exists to qemu_opts_create(), and if it fails, try the next made-up ID. The reproducer now succeeds, and creates an usb-storage device with ID usb1. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | Merge remote-tracking branch 'remotes/borntraeger/tags/s390x-20140923' into ↵Peter Maydell2014-09-234-11/+43
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging s390x/kvm: some fixes and cleanups 1. sclp: get of of duplicate defines 2. ccw: implement and fix handling of some special cases # gpg: Signature made Tue 23 Sep 2014 13:10:47 BST using RSA key ID B5A61C7C # gpg: Can't check signature: public key not found * remotes/borntraeger/tags/s390x-20140923: s390x/css: catch ccw sequence errors s390x/css: support format-0 ccws s390x: remove duplicate defines in SCLP code Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | s390x/css: catch ccw sequence errorsCornelia Huck2014-09-232-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | We must not allow chains of more than 255 ccws without data transfer. Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
| * | s390x/css: support format-0 ccwsCornelia Huck2014-09-233-9/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for format-0 ccws in channel programs. As a format-1 ccw contains the same information as format-0 ccws, only supporting larger addresses, simply convert every ccw to format-1 as we walk the chain. Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
| * | s390x: remove duplicate defines in SCLP codeJens Freimann2014-09-231-2/+0
| |/ | | | | | | | | | | | | Let's get rid of these duplicate defines. Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
* | Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into ↵Peter Maydell2014-09-2372-946/+2806
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging # gpg: Signature made Mon 22 Sep 2014 12:41:59 BST using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/block-pull-request: (59 commits) block: Always compile virtio-blk dataplane vring: Better error handling if num is too large virtio: Import virtio_vring.h async: aio_context_new(): Handle event_notifier_init failure block: vhdx - fix reading beyond pointer during image creation block: delete cow block driver block/archipelago: Fix typo in qemu_archipelago_truncate() ahci: Add test_identify case to ahci-test. ahci: Add test_hba_enable to ahci-test. ahci: Add test_hba_spec to ahci-test. ahci: properly shadow the TFD register ahci: add test_pci_enable to ahci-test. ahci: Add test_pci_spec to ahci-test. ahci: MSI capability should be at 0x80, not 0x50. ahci: Adding basic functionality qtest. layout: Add generators for refcount table and blocks fuzz: Add fuzzing functions for entries of refcount table and blocks docs: List all image elements currently supported by the fuzzer qapi/block-core: Add "new" qcow2 options qcow2: Add overlap-check.template option ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | block: Always compile virtio-blk dataplaneFam Zheng2014-09-225-41/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dataplane doesn't depend on linux-aio any more, so we don't need the compiling condition now. Configure options are kept but just print a message. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1410329871-28885-4-git-send-email-famz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | vring: Better error handling if num is too largeFam Zheng2014-09-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | To be more consistent inside this function. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1410329871-28885-3-git-send-email-famz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | virtio: Import virtio_vring.hFam Zheng2014-09-224-3/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This header has no further dependencies. It only has some stable data types and primitive functions, so we can copy it to include/hw/virtio in order to allow vring code (and its user virtio-blk dataplane) to be built unconditionally, even for cross compiling. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1410329871-28885-2-git-send-email-famz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | async: aio_context_new(): Handle event_notifier_init failureChrysostomos Nanakos2014-09-2212-18/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a system with a low limit of open files the initialization of the event notifier could fail and QEMU exits without printing any error information to the user. The problem can be easily reproduced by enforcing a low limit of open files and start QEMU with enough I/O threads to hit this limit. The same problem raises, without the creation of I/O threads, while QEMU initializes the main event loop by enforcing an even lower limit of open files. This commit adds an error message on failure: # qemu [...] -object iothread,id=iothread0 -object iothread,id=iothread1 qemu: Failed to initialize event notifier: Too many open files in system Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | block: vhdx - fix reading beyond pointer during image creationJeff Cody2014-09-221-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In vhdx_create_metadata(), we allocate 40 bytes to entry_buffer for the various metadata table entries. However, we write out 64kB from that buffer into the new file. Only write out the correct 40 bytes. Signed-off-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | block: delete cow block driverStefan Hajnoczi2014-09-2212-462/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes support for the cow file format. Normally we do not break backwards compatibility but in this case there is no impact and it is the most logical option. Extraordinary claims require extraordinary evidence so I will show why removing the cow block driver is the right thing to do. The cow file format is the disk image format for Usermode Linux, a way of running a Linux system in userspace. The performance of UML was never great and it was hacky, but it enjoyed some popularity before hardware virtualization support became mainstream. QEMU's block/cow.c is supposed to read this image file format. Unfortunately the file format was underspecified: 1. Earlier Linux versions used the MAXPATHLEN constant for the backing filename field. The value of MAXPATHLEN can change, so Linux switched to a 4096 literal but QEMU has a 1024 literal. 2. Padding was not used on the header struct (both in the Linux kernel and in QEMU) so the struct layout varied across architectures. In particular, i386 and x86_64 were different due to int64_t alignment differences. Linux now uses __attribute__((packed)), QEMU does not. Therefore: 1. QEMU cow images do not conform to the Linux cow image file format. 2. cow images cannot be shared between different host architectures. This means QEMU cow images are useless and QEMU has not had bug reports from users actually hitting these issues. Let's get rid of this thing, it serves no purpose and no one will be affected. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 1410877464-20481-1-git-send-email-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | block/archipelago: Fix typo in qemu_archipelago_truncate()Chrysostomos Nanakos2014-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | Fix a typo introduced by 94c80a438c85f2c19698547fbb115ea46d80c5f1 Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | ahci: Add test_identify case to ahci-test.John Snow2014-09-221-0/+304
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Utilizing all of the bring-up code in pci_enable and hba_enable, this test issues a simple IDENTIFY command via the HBA and retrieves the response via the PIO receive mechanisms of the HBA. Bugs: The DPS interrupt (Descriptor Processed Status) does not currently get set. This will need to be adjusted in a future patch series when the AHCI DMA pathways are reworked to allow the feature, which may be utilized by OSX guests. Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 1408643079-30675-9-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
OpenPOWER on IntegriCloud