summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* virtio-rng: cleanup: use QOM casts.KONRAD Frederic2013-04-242-13/+16
| | | | | | | | | | | | | As the virtio-rng-pci, virtio-rng-s390 and virtio-rng-ccw are switched to the new API, we can use QOM casts. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Andreas Färber <afaerber@suse.de> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1366790881-3026-9-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-rng: cleanup: remove qdev field.KONRAD Frederic2013-04-242-4/+0
| | | | | | | | | | The qdev field is no longer needed, just drop it. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1366790881-3026-8-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-rng: cleanup: init and exit functions.KONRAD Frederic2013-04-242-68/+21
| | | | | | | | | | This remove old init and exit function as they are no longer needed. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1366790881-3026-7-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-rng-ccw: switch to the new API.KONRAD Frederic2013-04-242-28/+32
| | | | | | | | | | | | Here the virtio-rng-ccw is modified for the new API. The device virtio-rng-pci extends virtio-pci. It creates and connects a virtio-rng-device during the init. The properties are not changed. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1366790881-3026-6-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-rng-s390: switch to the new API.KONRAD Frederic2013-04-242-17/+34
| | | | | | | | | | | | Here the virtio-rng-s390 is modified for the new API. The device virtio-rng-s390 extends virtio-s390-device as before. It creates and connects a virtio-rng during the init. The properties are not modified. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1366790881-3026-5-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-rng-pci: switch to the new API.KONRAD Frederic2013-04-242-90/+74
| | | | | | | | | | | | | | | Here the virtio-rng-pci is modified for the new API. The device virtio-rng-pci extends virtio-pci. It creates and connects a virtio-rng-device during the init. The properties are not changed. The virtio_pci_reset function, is removed as no longer used. The virtio_pci_rst function, is renamed virtio_pci_reset. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1366790881-3026-4-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-rng: add virtio-rng device.KONRAD Frederic2013-04-244-16/+117
| | | | | | | | | | | Create virtio-rng-device which extends virtio-device, so it can be connected on virtio-bus. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1366790881-3026-3-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-rng: don't use pointer for configuration.KONRAD Frederic2013-04-242-7/+7
| | | | | | | | | | | The configuration field must not be a pointer as it will be used for virtio-rng properties. So *conf is replaced by conf. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Amit Shah <amit.shah@redhat.com> Message-id: 1366790881-3026-2-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* input: introduce keyboard handler listGerd Hoffmann2013-04-244-16/+32
| | | | | | | | | | | | | | | Add a linked list of keyboard handlers. Added handlers will go to the head of the list. Removed handlers will be zapped from the list. The head of the list will be used for events. This fixes the keyboard-dead-after-usb-kbd-unplug issue, key events will be re-routed to the ps/2 kbd instead of being discarded. [ v2: fix cut+paste bug found my Markus ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1366798118-3248-3-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* input: make QEMUPutLEDEntry + QEMUPutMouseEntry privateGerd Hoffmann2013-04-242-17/+20
| | | | | | | | | | There is no need for anybody outside ui/input.c to access the struct elements. Move the definitions, leaving only the typedefs in the header files. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1366798118-3248-2-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ich9: kill cmos_s3Hu Tao2013-04-245-19/+6
| | | | | | | Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1366799842-18550-1-git-send-email-hutao@cn.fujitsu.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Move TPM passthrough specific command line options to backend structureStefan Berger2013-04-235-15/+33
| | | | | | | | | | | | Move the TPM passthrough specific command line options to the passthrough backend implementation and attach them to the backend's interface structure. Add code to tpm.c for validating the TPM command line options. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Corey Bryan <coreyb@linux.vnet.ibm.com> Message-id: 1366641699-21420-1-git-send-email-stefanb@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-9p: cleanup: QOM casts.KONRAD Frederic2013-04-233-10/+5
| | | | | | | | As the virtio-9p-pci is switched to the new API, we can use QOM casts. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366708123-19626-5-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-9p: cleanup: init function.KONRAD Frederic2013-04-231-52/+23
| | | | | | | | This remove old init function as it is no longer needed. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366708123-19626-4-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-9p-pci: switch to the new API.KONRAD Frederic2013-04-233-30/+54
| | | | | | | | | | Here the virtio-9p-pci is modified for the new API. The device virtio-9p-pci extends virtio-pci. It creates and connects a virtio-9p-device during the init. The properties are not changed. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366708123-19626-3-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-9p: add the virtio-9p device.KONRAD Frederic2013-04-233-9/+76
| | | | | | | | | Create virtio-9p-device which extends virtio-device, so it can be connected on virtio-bus. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366708123-19626-2-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ui/gtk: Add Turkish translationsOzan Çağlayan2013-04-231-0/+62
| | | | | | Signed-off-by: Ozan Çağlayan <ozancag@gmail.com> Message-id: 1366711456-1935-1-git-send-email-ozancag@gmail.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ui/gtk: Use gtk_widget_get_window() to support both gtk2 and gtk3Ozan Çağlayan2013-04-231-2/+2
| | | | | | | | This fixes build with gtk+-3.0. Signed-off-by: Ozan Çağlayan <ozancag@gmail.com> Message-id: 1366711402-1750-1-git-send-email-ozancag@gmail.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'kraxel/usb.81' into stagingAnthony Liguori2013-04-237-21/+46
|\ | | | | | | | | | | | | | | | | | | | | | | | | # By Gerd Hoffmann (3) and Hans de Goede (1) # Via Gerd Hoffmann * kraxel/usb.81: usb-host: raise libusbx minimum version to 1.0.13 usb: better speed mismatch error reporting ehci_free_packet: Discard finished packets when the queue is halted xhci: remove XHCIRing->base (unused) Message-id: 1366705929-11251-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * usb-host: raise libusbx minimum version to 1.0.13Gerd Hoffmann2013-04-232-6/+1
| | | | | | | | | | | | | | | | | | Allows to remove one FIXME. Makes LIBUSB_LOG_LEVEL_WARNING build errors go away. And starting with that version libusb has a LIBUSBX_API_VERSION define which allows to easily #ifdef version dependencies should that need arrive in the future. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * usb: better speed mismatch error reportingGerd Hoffmann2013-04-233-7/+33
| | | | | | | | | | | | | | | | | | Report the supported speeds for device and port in the error message. Also add the speeds to the tracepoint. And while being at it drop the redundant error message in usb_desc_attach, usb_device_attach will report the error anyway. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * ehci_free_packet: Discard finished packets when the queue is haltedHans de Goede2013-04-231-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With pipelining it is possible to encounter a finished packet when cleaning the queue due to a halt. This happens when a non stall error happens while talking to a real device. In this case the queue on the usb-host side will continue processing packets, and we can have completed packets waiting in the queue after an error condition packet causing a halt. There are 2 reasons to discard the completed packets at this point, rather then trying to writing them back to the guest: 1) The guest expect to be able to cancel and/or change packets after the packet with the error without doing an unlink, so writing them back may confuse the guest. 2) Since the queue does not advance when halted, the writing back of these packets will fail anyways since p->qtdaddr != q->qtdaddr, so the ehci_verify_qtd call in ehci_writeback_async_complete_packet will fail. Note that 2) means that then only functional change this patch introduces is the printing of a warning when this scenario happens. Note that discarding these packets means that the guest driver and the device will get out of sync! This is unfortunate, but should not be a problem since with a non stall error (iow an io-error) the 2 are out of sync already anyways. Still this patch adds a warning to signal this happening. Note that sofar this has only been seen with a DVB-T receiver, which gives of a MPEG-2 stream, which allows for recovering from lost packets, see: https://bugzilla.redhat.com/show_bug.cgi?id=890320 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * xhci: remove XHCIRing->base (unused)Gerd Hoffmann2013-04-231-3/+1
|/ | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* block: Fix build with tracing enabledKevin Wolf2013-04-221-7/+7
| | | | | | | | | | | | filename was still uninitialised when it's used as a parameter to a tracing function, so let's move the initialisation. Also, commit c2ad1b0c forgot to add a NULL check, which this patch adds while we're at it. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Tested-by: Andreas Färber <afaerber@suse.de> Message-id: 1366645720-11384-1-git-send-email-kwolf@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* tpm: Simplify creation of cancel pathStefan Berger2013-04-221-57/+17
| | | | | | | | | | Simplify the creation of the cancel path given the TPM's device path. Given the path /dev/tpm0 build the path /sys/class/misc/tpm0/device/cancel. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1366146516-23814-1-git-send-email-stefanb@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qtest: Handle addresses and values for {in, out}[bwl] as unsignedPeter Maydell2013-04-221-3/+3
| | | | | | | | | | | Handle the addresses and values for {in,out}[bwl] as unsigned (ie with strtoul), as per the protocol specification comment. This fixes a test failure in test_i440fx_defaults on 32-bit hosts where the test tries to write 0x80000000 and qtest was instead writing 0x7fffffff. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1366551003-16649-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Add option to mlock qemu and guest memorySatoru Moriya2013-04-225-0/+65
| | | | | | | | | | | | | | | | | | In certain scenario, latency induced by paging is significant and memory locking is needed. Also, in the scenario with untrusted guests, latency improvement due to mlock is desired. This patch introduces a following new option to mlock guest and qemu memory: -realtime mlock=on|off Signed-off-by: Satoru Moriya <satoru.moriya@hds.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1366382526-26146-1-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu-char: do not operate on sources from finalize callbacksPaolo Bonzini2013-04-221-15/+40
| | | | | | | | | | | | | | | | | | Due to a glib bug, the finalize callback is called with the GMainContext lock held. Thus, any operation on the context from the callback will cause recursive locking and a deadlock. This happens, for example, when a client disconnects from a socket chardev. The fix for this is somewhat ugly, because we need to forego polymorphism and implement our own function to destroy IOWatchPoll sources. The right thing to do here would be child sources, but we support older glib versions that do not have them. Not coincidentially, glib developers found and fixed the deadlock as part of implementing child sources. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Tested-by: Sander Eikelenboom <linux@eikelenboom.it> Message-id: 1366385529-10329-5-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu-char: correct return value from chr_read functionsPaolo Bonzini2013-04-221-6/+16
| | | | | | | | | | | | | | Even if a CharDriverState's source is blocked by the front-end, it must not be dropped. The IOWatchPoll that wraps it will take care of adding and removing it to the main loop. Only remove the source when the channel is closed; and in that case, make sure that the wrapping IOWatchPoll is removed too. These should just be theoretical bugs. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1366385529-10329-4-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu-char: simplify pty pollingPaolo Bonzini2013-04-221-24/+17
| | | | | | | | | | | | | | | There is no need to use a timer and pty_chr_read to detect a connected pty. It is simpler to just call g_poll periodically and check for POLLHUP. It is done once per second, and only if the pty is disconnected, so it is cheap enough. Tested with "-monitor pty" and "-serial mon:pty", both of which work correctly and do not freeze QEMU. (How to test ptys? "socat -,raw,echo=0 /dev/pts/4,raw"). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1366385529-10329-3-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu-char: use consistent idiom for removing sourcesPaolo Bonzini2013-04-221-9/+23
| | | | | | | | | | | Always check that the source is active, and zero the tag afterwards. The occurrence in pty_chr_state will trigger with the next patch, the others are just theoretical. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1366385529-10329-2-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* translate-all: fix compiler warning and linked errorAlexey Kardashevskiy2013-04-221-0/+1
| | | | | | | | | The code did use profile_getclock() but did not include include/qemu/timer.h where this function is defined. The patch fixes this. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Message-id: 1366616571-4321-1-git-send-email-aik@ozlabs.ru Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2013-04-2225-243/+862
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # By Kevin Wolf (16) and Stefan Hajnoczi (4) # Via Kevin Wolf * kwolf/for-anthony: qemu-iotests: add 053 unaligned compressed image size test block: Allow overriding backing.file.filename block: Remove filename parameter from .bdrv_file_open() vvfat: Use bdrv_open options instead of filename sheepdog: Use bdrv_open options instead of filename rbd: Use bdrv_open options instead of filename iscsi: Use bdrv_open options instead of filename gluster: Use bdrv_open options instead of filename curl: Use bdrv_open options instead of filename blkverify: Use bdrv_open options instead of filename blkdebug: Use bdrv_open options instead of filename raw-win32: Use bdrv_open options instead of filename raw-posix: Use bdrv_open options instead of filename block: Enable filename option block: Add driver-specific options for backing files block: Fail gracefully when using a format driver on protocol level qemu-iotests: Fix _filter_qemu qemu-img: do not zero-pad the compressed write buffer qcow: allow sub-cluster compressed write to last cluster qcow2: allow sub-cluster compressed write to last cluster Message-id: 1366630294-18984-1-git-send-email-kwolf@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * qemu-iotests: add 053 unaligned compressed image size testStefan Hajnoczi2013-04-223-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Test that qemu-img convert -c works when input image length is not a multiple of the cluster size. Previously an error message would be produced: qemu-img: error while compressing sector 0: Input/output error Now that qcow2 and qcow handle this case the test passes successfully. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: Allow overriding backing.file.filenameKevin Wolf2013-04-221-1/+3
| | | | | | | | | | | | | | | | If a filename is passed in the driver-specific options from the command line, the backing file path from the image is ignored now. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * block: Remove filename parameter from .bdrv_file_open()Kevin Wolf2013-04-2214-43/+22
| | | | | | | | | | | | | | It is unused now in all block drivers. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * vvfat: Use bdrv_open options instead of filenameKevin Wolf2013-04-221-60/+168
| | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * sheepdog: Use bdrv_open options instead of filenameKevin Wolf2013-04-221-1/+31
| | | | | | | | | | | | | | | | | | This is only to convert the internal interface that is used for passing the "filename" to be parsed, but converting to actual fine grained options is left for another day, as it doesn't look trivial. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * rbd: Use bdrv_open options instead of filenameKevin Wolf2013-04-221-1/+30
| | | | | | | | | | | | | | | | | | This is only to convert the internal interface that is used for passing the "filename" to be parsed, but converting to actual fine grained options is left for another day, as it doesn't look trivial. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * iscsi: Use bdrv_open options instead of filenameKevin Wolf2013-04-221-2/+37
| | | | | | | | | | | | | | | | | | This is only to convert the internal interface that is used for passing the "filename" to be parsed, but converting to actual fine grained options is left for another day, as it doesn't look trivial. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * gluster: Use bdrv_open options instead of filenameKevin Wolf2013-04-221-1/+31
| | | | | | | | | | | | | | | | | | This is only to convert the internal interface that is used for passing the "filename" to be parsed, but converting to actual fine grained options is left for another day, as it doesn't look trivial. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * curl: Use bdrv_open options instead of filenameKevin Wolf2013-04-221-51/+102
| | | | | | | | | | | | | | | | | | As a bonus, going through the QemuOpts QEMU_OPT_SIZE parser for the readahead option gives us proper error reporting that the previous use of atoi() lacked. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * blkverify: Use bdrv_open options instead of filenameKevin Wolf2013-04-221-29/+85
| | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * blkdebug: Use bdrv_open options instead of filenameKevin Wolf2013-04-221-32/+82
| | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * raw-win32: Use bdrv_open options instead of filenameKevin Wolf2013-04-221-10/+47
| | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * raw-posix: Use bdrv_open options instead of filenameKevin Wolf2013-04-221-12/+45
| | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * block: Enable filename optionKevin Wolf2013-04-221-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows using the file.filename option instead of the string that comes from -drive file=... and is passed around as a separate parameter. The goal is to get rid of this parameter and use the options QDict more consistently. With this option you can access not only the top-level image, but specify a filename for the backing file (currently only if no backing file exists, but we'll allow overriding it later) Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * block: Add driver-specific options for backing filesKevin Wolf2013-04-223-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Options starting in "backing." are passed to the backing file now. If you don't need to specify the filename for the backing file, you can add it on the command line instead of in the image file: $ qemu-nbd -t /tmp/test.img $ qemu-img create -f qcow2 empty.qcow2 1G $ qemu-system-x86_64 -drive file=empty.qcow2,backing.file.driver=nbd,\ backing.file.host=localhost Note that this doesn't override the backing filename from the image. If the image has one, this will fail because NBD doesn't want the options and a filename at the same time. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * block: Fail gracefully when using a format driver on protocol levelKevin Wolf2013-04-223-0/+24
| | | | | | | | | | | | | | | | | | | | Specifying the wrong driver could fail an assertion: $ qemu-system-x86_64 -drive file.driver=qcow2,file=x qemu-system-x86_64: block.c:721: bdrv_open_common: Assertion `file != ((void *)0)' failed. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * qemu-iotests: Fix _filter_qemuKevin Wolf2013-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | $QEMU_PROG happens to be 'qemu' in my setup, so this sed command replaces a bit too much. Restrict it to the start of the line and to when it's followed by a colon, i.e. the form used by error messages. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
OpenPOWER on IntegriCloud