summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-04-24libcacard: fix mingw64 cross-compilationMarc-André Lureau
Compile and link with version.lo Signed-off-by: Marc-André Lureau <mlureau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
2013-04-24build-sys: must link with -fstack-protectorMarc-André Lureau
It is needed to give that flag to the linker as well, but latest libtool 2.4.2 still swallows that argument, so let's pass it with libtool -Wc argument. qemu-1.4.0/stubs/arch-query-cpu-def.c:6: undefined reference to `__stack_chk_guard' Signed-off-by: Marc-André Lureau <mlureau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
2013-04-24util: move socket_init() to osdep.cMarc-André Lureau
vscclient needs to call socket_init() for portability. Moving to osdep.c since it has no internal dependency. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
2013-04-24libcacard: use system config directory for nss db on win32Marc-André Lureau
It's a bit nicer to look for default database under CSIDL_COMMON_APPDATA\pki\nss rather that /etc/pki/nss. Signed-off-by: Marc-André Lureau <mlureau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
2013-04-24ccid: declare DEFAULT_ATR table to be "static const"Jim Meyering
Signed-off-by: Jim Meyering <meyering@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24ccid: make backend_enum_table "static const" and adjust usersJim Meyering
Signed-off-by: Jim Meyering <meyering@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
2013-04-24ccid-card-emul: do not crash if backend is not providedMarc-André Lureau
Program received signal SIGSEGV, Segmentation fault. __strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:164 164 movdqu (%rsi), %xmm2 (gdb) bt at /home/elmarco/320g/src/qemu/hw/ccid-card-emulated.c:477 at /home/elmarco/320g/src/qemu/hw/ccid-card-emulated.c:503 Signed-off-by: Marc-André Lureau <mlureau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
2013-04-24libcacard: correct T0 historical bytes sizeMarc-André Lureau
The VCARD_ATR_PREFIX macro adds a prefix of 6 characters only. pcsc_scan was complaining before the patch: + Historical bytes: 56 43 41 52 44 5F 4E 53 53 ERROR! ATR is truncated: 2 byte(s) is/are missing Signed-off-by: Marc-André Lureau <mlureau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
2013-04-23Move TPM passthrough specific command line options to backend structureStefan Berger
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>
2013-04-23virtio-9p: cleanup: QOM casts.KONRAD Frederic
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>
2013-04-23virtio-9p: cleanup: init function.KONRAD Frederic
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>
2013-04-23virtio-9p-pci: switch to the new API.KONRAD Frederic
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>
2013-04-23virtio-9p: add the virtio-9p device.KONRAD Frederic
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>
2013-04-23ui/gtk: Add Turkish translationsOzan Çağlayan
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>
2013-04-23ui/gtk: Use gtk_widget_get_window() to support both gtk2 and gtk3Ozan Çağlayan
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>
2013-04-23Merge remote-tracking branch 'kraxel/usb.81' into stagingAnthony Liguori
# 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>
2013-04-23usb-host: raise libusbx minimum version to 1.0.13Gerd Hoffmann
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>
2013-04-23usb: better speed mismatch error reportingGerd Hoffmann
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>
2013-04-23ehci_free_packet: Discard finished packets when the queue is haltedHans de Goede
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>
2013-04-23xhci: remove XHCIRing->base (unused)Gerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-22block: Fix build with tracing enabledKevin Wolf
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>
2013-04-22tpm: Simplify creation of cancel pathStefan Berger
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>
2013-04-22qtest: Handle addresses and values for {in, out}[bwl] as unsignedPeter Maydell
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>
2013-04-22Add option to mlock qemu and guest memorySatoru Moriya
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>
2013-04-22qemu-char: do not operate on sources from finalize callbacksPaolo Bonzini
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>
2013-04-22qemu-char: correct return value from chr_read functionsPaolo Bonzini
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>
2013-04-22qemu-char: simplify pty pollingPaolo Bonzini
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>
2013-04-22qemu-char: use consistent idiom for removing sourcesPaolo Bonzini
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>
2013-04-22translate-all: fix compiler warning and linked errorAlexey Kardashevskiy
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>
2013-04-22Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori
# 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>
2013-04-22Merge remote-tracking branch 'bonzini/nbd-next' into stagingAnthony Liguori
# By Stefan Hajnoczi # Via Paolo Bonzini * bonzini/nbd-next: nbd: set TCP_NODELAY nbd: use TCP_CORK in nbd_co_send_request() nbd: unlock mutex in nbd_co_send_request() error path Message-id: 1366381830-11267-1-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-22Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori
# By Paolo Bonzini (5) and others # Via Paolo Bonzini * bonzini/scsi-next: vhost-scsi-s390: new device supporting the tcm_vhost Linux kernel module vhost-scsi-ccw: new device supporting the tcm_vhost Linux kernel module vhost-scsi-pci: new device supporting the tcm_vhost Linux kernel module vhost-scsi: new device supporting the tcm_vhost Linux kernel module virtio: simplify Makefile conditionals virtio-scsi: create VirtIOSCSICommon vhost: Add vhost_commit callback for SeaBIOS ROM region re-mapping scsi: VMWare PVSCSI paravirtual device implementation scsi: avoid assertion failure on VERIFY command Message-id: 1366381460-6041-1-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-22Merge remote-tracking branch 'luiz/queue/qmp' into stagingAnthony Liguori
# By Amos Kong (1) and Luiz Capitulino (1) # Via Luiz Capitulino * luiz/queue/qmp: virtio-balloon: fix integer overflow in BALLOON_CHANGE QMP event monitor: fix the wrong order of releasing keys Message-id: 1366375833-995-1-git-send-email-lcapitulino@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-22qemu-iotests: add 053 unaligned compressed image size testStefan Hajnoczi
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>
2013-04-22block: Allow overriding backing.file.filenameKevin Wolf
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>
2013-04-22block: Remove filename parameter from .bdrv_file_open()Kevin Wolf
It is unused now in all block drivers. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-04-22vvfat: Use bdrv_open options instead of filenameKevin Wolf
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-04-22sheepdog: Use bdrv_open options instead of filenameKevin Wolf
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>
2013-04-22rbd: Use bdrv_open options instead of filenameKevin Wolf
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>
2013-04-22iscsi: Use bdrv_open options instead of filenameKevin Wolf
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>
2013-04-22gluster: Use bdrv_open options instead of filenameKevin Wolf
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>
2013-04-22curl: Use bdrv_open options instead of filenameKevin Wolf
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>
2013-04-22blkverify: Use bdrv_open options instead of filenameKevin Wolf
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-04-22blkdebug: Use bdrv_open options instead of filenameKevin Wolf
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-04-22raw-win32: Use bdrv_open options instead of filenameKevin Wolf
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-04-22raw-posix: Use bdrv_open options instead of filenameKevin Wolf
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2013-04-22block: Enable filename optionKevin Wolf
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>
2013-04-22block: Add driver-specific options for backing filesKevin Wolf
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>
2013-04-22block: Fail gracefully when using a format driver on protocol levelKevin Wolf
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>
2013-04-22qemu-iotests: Fix _filter_qemuKevin Wolf
$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>