- 01 7月, 2014 15 次提交
-
-
由 Paolo Bonzini 提交于
Shut up Coverity's complaint about unchecked fcntl return values, and especially make the code simpler and more efficient. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Jincheng Miao 提交于
If libusb_get_device_list() fails, the uninitialized local variable libusb_device would be passed to libusb_free_device_list(), that will cause a crash, like: (gdb) bt #0 0x00007fbbb4bafc10 in pthread_mutex_lock () from /lib64/libpthread.so.0 #1 0x00007fbbb233e653 in libusb_unref_device (dev=0x6275682d627375) at core.c:902 #2 0x00007fbbb233e739 in libusb_free_device_list (list=0x7fbbb6e8436e, unref_devices=<optimized out>) at core.c:653 #3 0x00007fbbb6cd80a4 in usb_host_auto_check (unused=unused@entry=0x0) at hw/usb/host-libusb.c:1446 #4 0x00007fbbb6cd8525 in usb_host_initfn (udev=0x7fbbbd3c5670) at hw/usb/host-libusb.c:912 #5 0x00007fbbb6cc123b in usb_device_init (dev=0x7fbbbd3c5670) at hw/usb/bus.c:106 ... So initialize libusb_device at the begin time. Signed-off-by: NJincheng Miao <jmiao@redhat.com> Reviewed-by: NGonglei <arei.gonglei@huawei.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Hani Benhabiles 提交于
Due to an incomplete initialization, adding a usb-bt-dongle device through HMP or QMP will cause a segmentation fault. Signed-off-by: NHani Benhabiles <hani@linux.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Christian Burger 提交于
Guest mouse pointer was jumpy, when moving host mouse in the vertical direction (see bug #1327800). Signed-off-by: NChristian Burger <christian@krikkel.de> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Peter Maydell 提交于
QOM and device refactorings * QOM unparenting cleanup * IRQ conversion to QOM # gpg: Signature made Tue 01 Jul 2014 04:03:23 BST using RSA key ID 3E7E013F # gpg: Good signature from "Andreas Färber <afaerber@suse.de>" # gpg: aka "Andreas Färber <afaerber@suse.com>" * remotes/afaerber/tags/qom-devices-for-2.1: irq: Slim conversion of qemu_irq to QOM irq: Allocate IRQs individually hw: Fix qemu_allocate_irqs() leaks sdhci: Fix misuse of qemu_free_irqs() qom: Remove parent pointer when unparenting Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Peter Maydell 提交于
* remotes/bonzini/scsi-next: configure: Fix -lm test, so that tools can be compiled on hosts that require -lm virtio-scsi: scsi events must be converted to target endianness virtio-scsi: virtio_scsi_push_event() lacks VirtIOSCSIReq parsing Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Alexey Kardashevskiy 提交于
The existing test whether "-lm" needs to be included or not is insufficient as it reports false negative on Fedora20/ppc64. This happens because sin(0.0) is a constant value which compiler can safely throw away and therefore there is no need to add "-lm". As the result, qemu-nbd/qemu-io/qemu-img tools cannot compile. This adds a global variable and uses it in the test to prevent from optimization. Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru> [Use Peter's improvement on the test to fool LTO, and remove the now useless -lm addition in Makefile.target. - Paolo] Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Cédric Le Goater 提交于
Virtio SCSI Events need to be byteswapped before being pushed when host and guest have a different endianness. Not doing so breaks hotplug of virtio scsi disks, with the following error message being printed in the guest console: virtio_scsi: Unsupport virtio scsi event 1000000 This issue got uncovered while testing disk hotplug with a PowerKVM ppc64le guest. I have checked that this issue also affects a x86_64 guest run on a ppc64 host. Signed-off-by: NCédric Le Goater <clg@fr.ibm.com> [ Ported from PowerKVM, Greg Kurz <gkurz@linux.vnet.ibm.com> ] Signed-off-by: NGreg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Greg Kurz 提交于
Hotplug of a virtio scsi disk is currently broken: no disk appears in the guest (verified with a fedora 20 host running a fedora 20 guest with KVM). Bisect leeds to Paolo's patches to support any_layout, especially this commit: commit 36b15c79 Author: Paolo Bonzini <pbonzini@redhat.com> Date: Tue Jun 10 16:21:18 2014 +0200 virtio-scsi: start preparing for any_layout It modifies virtio_scsi_pop_req() so that it is up to the callers to parse the virtio scsi request. It seems that virtio_scsi_push_event() was not modified accordingly... This patch adds a call to virtio_scsi_parse_req(). It also drops some sanity checks that are already performed by virtio_scsi_parse_req(). Signed-off-by: NGreg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Andreas Färber 提交于
As a prequel to any big Pin refactoring plans, do an in-place conversion of qemu_irq to an Object, so that we can reference it in link<> properties. Signed-off-by: NAndreas Färber <afaerber@suse.de> [ PC Changes: * Removed array-alloctor ref counting logic (limit changes just to * single IRQ allocator) * Removed WIP marking from subject line ] Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com> Acked-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Peter Crosthwaite 提交于
Allocate each IRQ individually on array allocations. This prepares for QOMification of IRQs, where pointers to individual IRQs may be taken and handed around for usage as QOM Links. The g_renew() scheme used here is too fragile and would break all existing links should an IRQ list be extended. We now have to pass the IRQ count to qemu_free_irqs(). We have so few call sites however, so this change is reasonably trivial. Cc: agarcia@igalia.com Cc: mst@redhat.com Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Acked-by: NAlberto Garcia <agarcia@igalia.com> Signed-off-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Replace qemu_allocate_irqs(foo, bar, 1)[0] with qemu_allocate_irq(foo, bar, 0). This avoids leaking the dereferenced qemu_irq *. Cc: Markus Armbruster <armbru@redhat.com> Reviewed-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NAndreas Färber <afaerber@suse.de> [PC Changes: * Applied change to instance in sh4/sh7750.c ] Signed-off-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: NKirill Batuzov <batuzovk@ispras.ru> [AF: Fix IRQ index in sh4/sh7750.c] Cc: qemu-stable@nongnu.org Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
It does a g_free() on the pointer, so don't pass a local &foo reference. Reviewed-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Cc: qemu-stable@nongnu.org Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Peter Crosthwaite 提交于
Certain parts of the QOM framework test this pointer to determine if an object is parented. Nuke it when the object is unparented to allow for reuse of an object after unparenting. Signed-off-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Peter Maydell 提交于
VFIO patches: MSI-X masking performance fix, Endian fixes, fix runstate on device error # gpg: Signature made Mon 30 Jun 2014 18:13:40 BST using RSA key ID 3BB08B22 # gpg: Can't check signature: public key not found * remotes/awilliam/tags/vfio-pci-for-qemu-20140630.0: vfio: use correct runstate vfio: Make BARs native endian vfio-pci: Fix MSI-X masking performance vfio-pci: Fix MSI/X debug code Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 30 6月, 2014 25 次提交
-
-
由 Paolo Bonzini 提交于
io-error is for block device errors; it should always be preceded by a BLOCK_IO_ERROR event. I think vfio wants to use RUN_STATE_INTERNAL_ERROR instead. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
-
由 Alexey Kardashevskiy 提交于
Slow BAR access path is used when VFIO fails to mmap() BAR. Since this is just a transport between the guest and a device, there is no need to do endianness swapping. This changes BARs to use native endianness. Since non-ROM BARs were doing byte swapping, we need to remove it so does the patch. As the result, this eliminates cancelling byte swaps and there is no change in behavior for non-ROM BARs. ROM BARs were declared little endian too but byte swapping was not implemented for them so they never actually worked on big endian systems as there was no cancelling byte swap. This fixes endiannes for ROM BARs by declaring them native endian and only fixing access sizes as it is done for non-ROM BARs. Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
-
由 Alex Williamson 提交于
There are still old guests out there that over-exercise MSI-X masking. The current code completely sets-up and tears-down an MSI-X vector on the "use" and "release" callbacks. While this is functional, it can slow an old guest to a crawl. We can easily skip the KVM parts of this so that we keep the MSI route and irqfd setup. We do however need to switch VFIO to trigger a different eventfd while masked. Actually, we have the option of continuing to use -1 to disable the trigger, but by using another EventNotifier we can allow the MSI-X core to emulate pending bits and re-fire the vector once unmasked. MSI code gets updated as well to use the same setup and teardown structures and functions. Prior to this change, an igbvf assigned to a RHEL5 guest gets about 20Mbps and 50 transactions/s with netperf (remote or VF->PF). With this change, we get line rate and 3k transactions/s remote or 2Gbps and 6k+ transactions/s to the PF. No significant change is expected for newer guests with more well behaved MSI-X support. Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
-
由 Alex Williamson 提交于
Use the correct MSI message function for debug info. Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
-
由 Peter Maydell 提交于
* remotes/bonzini/nbd-next: nbd: Handle NBD_OPT_LIST option. nbd: Handle fixed new-style clients. nbd: Shutdown socket before closing. nbd: Don't validate from and len in NBD_CMD_DISC. nbd: Don't export a block device with no medium. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Peter Maydell 提交于
* remotes/bonzini/small-fixes: tests/test-qmp-event: fix for GLib < 2.31 serial: poll the serial console with G_IO_HUP Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Peter Maydell 提交于
cocoa.next: * Honour -show-cursor option * Fix handling of absolute positioning devices * Cope with first surface being same as initial window size # gpg: Signature made Mon 30 Jun 2014 13:48:46 BST using RSA key ID 14360CDE # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" * remotes/pmaydell/tags/pull-cocoa-20140630: ui/cocoa: Honour -show-cursor command line option ui/cocoa: Fix handling of absolute positioning devices ui/cocoa: Add utility method to check if point is within window ui/cocoa: Cope with first surface being same as initial window size Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Peter Maydell 提交于
target-arm: * provide PL031 RTC in virt board * fix missing pxa2xx and strongarm vmstate * convert cadence_ttc to instance_init * fix libvixl format strings and README # gpg: Signature made Mon 30 Jun 2014 13:44:33 BST using RSA key ID 14360CDE # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" * remotes/pmaydell/tags/pull-target-arm-20140630: disas/libvixl: Fix wrong format strings disas/libvixl: Update README for version base timer: cadence_ttc: Convert to instance_init hw/arm/pxa2xx_gpio: Correct and register vmstate hw/arm/pxa2xx_gpio: Fix handling of GPSR/GPCR reads hw/arm/strongarm: Wire up missing GPIO and PPC vmstate hw/arm/strongarm: Fix handling of GPSR/GPCR reads hw/arm/virt: Provide PL031 RTC Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Paolo Bonzini 提交于
On old GLib, the test needs a g_thread_init call. Reported-by: NWenchao Xia <wenchaoqemu@gmail.com> Tested-by: NWenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Roger Pau Monne 提交于
On FreeBSD polling a master pty while the other end is not connected with G_IO_OUT only results in an endless wait. This is different from the Linux behaviour, that returns immediately. In order to demonstrate this, I have the following example code: http://xenbits.xen.org/people/royger/test_poll.c When executed on Linux: $ ./test_poll In callback On FreeBSD instead, the callback never gets called: $ ./test_poll So, in order to workaround this, poll the source with G_IO_HUP (which makes the code behave the same way on both Linux and FreeBSD). Signed-off-by: NRoger Pau Monné <roger.pau@citrix.com> Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Cc: Michael Tokarev <mjt@tls.msk.ru> Cc: "Andreas Färber" <afaerber@suse.de> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: xen-devel@lists.xenproject.org [Add hw/char/cadence_uart.c too. - Paolo] Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Hani Benhabiles 提交于
Signed-off-by: NHani Benhabiles <kroosec@gmail.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Hani Benhabiles 提交于
When this flag is set, the server tells the client that it can send another option if the server received a request with an option that it doesn't understand instead of directly closing the connection. Also add link to the most up-to-date documentation. Signed-off-by: NHani Benhabiles <kroosec@gmail.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Hani Benhabiles 提交于
This forces finishing data sending to client before closing the socket like in exports listing or replying with NBD_REP_ERR_UNSUP cases. Signed-off-by: NHani Benhabiles <kroosec@gmail.com> Cc: qemu-stable@nongnu.org Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Stefan Weil 提交于
When the compiler is told to check the arguments of AppendToOutput, it reports several errors of this kind: error: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘int64_t {aka long int}’ [-Werror=format] Fix those bugs by using the correct format strings with PRId64, PRIx64. Signed-off-by: NStefan Weil <sw@weilnetz.de> Message-id: 1403113751-19799-1-git-send-email-sw@weilnetz.de Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Richard Henderson 提交于
Signed-off-by: NRichard Henderson <rth@redhat.com> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Peter Maydell 提交于
Honour the -show-cursor command line option (which forces the mouse pointer to always be displayed even when input is grabbed) in the Cocoa UI backend. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Message-id: 1403516125-14568-5-git-send-email-peter.maydell@linaro.org
-
由 Peter Maydell 提交于
Fix handling of absolute positioning devices, which were basically unusable for two separate reasons: (1) as soon as you pressed the left mouse button we would call CGAssociateMouseAndMouseCursorPosition(FALSE), which means that the absolute coordinates of the mouse events are never updated (2) we didn't account for MacOSX coordinate origin being bottom left rather than top right, and so all the Y values sent to the guest were inverted We fix (1) by aligning our behaviour with the SDL UI backend for absolute devices: * when the mouse moves into the window we do a grab (which means hiding the host cursor and sending special keys to the guest) * when the mouse moves out of the window we un-grab and fix (2) by doing the correct transformation in the call to qemu_input_queue_abs(). Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Message-id: 1403516125-14568-4-git-send-email-peter.maydell@linaro.org
-
由 Peter Maydell 提交于
Add a utility method to check whether a point is within the current window bounds, and use it in the various places in the mouse handling code that were opencoding the check. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Message-id: 1403516125-14568-3-git-send-email-peter.maydell@linaro.org
-
由 Peter Maydell 提交于
Do the recalculation of the content dimensions in switchSurface if the current cdx is zero as well as if the new surface is a different size to the current window. This catches the case where the first surface registered happens to be 640x480 (our current window size), and fixes a bug where we would always display a black screen until the first surface of a different size was registered. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Message-id: 1403516125-14568-2-git-send-email-peter.maydell@linaro.org
-
由 Alistair Francis 提交于
SysBusDevice::init is deprecated. Convert to instance_init as prescribed by QOM conventions. Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com> Message-id: 1223f14833159b9ea5c57734dd2ffa88d4b15a83.1403583596.git.alistair.francis@xilinx.com Reviewed-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Peter Maydell 提交于
The pxa2xx-gpio device has a VMStateDescription, but it was accidentally never actually registered, and it wasn't quite correct. Remove the 'lines' field (this is a device property, not mutable state), add the missing 'prev_level' field, and set dc->vmsd so it actually gets used. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
-
由 Peter Maydell 提交于
The PXA2xx GPIO GPSR and GPCR registers are write-only, with reads being undefined behaviour. Instead of having GPCR return 31337 and GPSR return the value last written, make both log the guest error and return 0. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
-
由 Peter Maydell 提交于
The VMStateDescription structs for the GPIO and PPC devices were accidentally never wired up. Add missing state fields and register them via dc->vmsd. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
-
由 Peter Maydell 提交于
The StrongARM GPIO GPSR and GPCR registers are write-only, with reads being undefined behaviour. Instead of having GPCR return 31337 and GPSR return the value last written, make both log the guest error and return 0. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
-
由 Peter Maydell 提交于
UEFI mandates that the platform must include an RTC, so provide one in 'virt', using the PL031. This is also useful for directly booting Linux kernels which would otherwise have to run ntpdate. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Tested-by: NAurelien Jarno <aurelien@aurel32.net> Reviewed-by: NAurelien Jarno <aurelien@aurel32.net>
-