- 10 12月, 2013 16 次提交
-
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Andreas Färber 提交于
Rename variable qdev -> dev since that's what realize's argument is called by convention. Signed-off-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Andreas Färber 提交于
Avoid unnecessary VIRTIO_DEVICE(). Signed-off-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Andreas Färber 提交于
Return an Error so that it can be propagated later. Tested-by: NStefan Hajnoczi <stefanha@redhat.com> Acked-by: NStefan Hajnoczi <stefanha@redhat.com> [AF: Rebased] Signed-off-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
This fixes a crash in hot-unplug of virtio-pci devices behind a PCIe switch. The crash happens because the ioeventfd is still set whent the child is destroyed (destruction happens in postorder). Then the proxy tries to unset to ioeventfd, but the virtqueue structure that holds the EventNotifier has been trashed in the meanwhile. kvm_set_ioeventfd_pio does not expect failure and aborts. The fix is simply to move parts of uninitialization to a new device_unplugged callback, which is called before the child is destroyed. Cc: qemu-stable@nongnu.org Acked-by: NAndreas Faerber <afaerber@suse.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
This ensures hot-unplug is handled properly by the proxy, and avoids leaking bus_name which is freed by virtio_device_exit. Cc: qemu-stable@nongnu.org Acked-by: NAndreas Faerber <afaerber@suse.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
This ensures hot-unplug is handled properly by the proxy, and avoids leaking bus_name which is freed by virtio_device_exit. Cc: qemu-stable@nongnu.org Acked-by: NAndreas Faerber <afaerber@suse.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
This ensures hot-unplug is handled properly by the proxy, and avoids leaking bus_name which is freed by virtio_device_exit. Cc: qemu-stable@nongnu.org Acked-by: NAndreas Faerber <afaerber@suse.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
This ensures hot-unplug is handled properly by the proxy, and avoids leaking bus_name which is freed by virtio_device_exit. Cc: qemu-stable@nongnu.org Acked-by: NAndreas Faerber <afaerber@suse.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
This ensures hot-unplug is handled properly by the proxy, and avoids leaking bus_name which is freed by virtio_device_exit. Cc: qemu-stable@nongnu.org Acked-by: NAndreas Faerber <afaerber@suse.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
This ensures hot-unplug is handled properly by the proxy, and avoids leaking bus_name which is freed by virtio_device_exit. Cc: qemu-stable@nongnu.org Acked-by: NAndreas Faerber <afaerber@suse.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Right now we have these pairs: - virtio_bus_plug_device/virtio_bus_destroy_device. The first takes a VirtIODevice, the second takes a VirtioBusState - device_plugged/device_unplug callbacks in the VirtioBusClass (here it's just the naming that is inconsistent) - virtio_bus_destroy_device is not called by anyone (and since it calls qdev_free, it would be called by the proxies---but then the callback is useless since the proxies can do whatever they want before calling virtio_bus_destroy_device) And there is a k->init but no k->exit, hence virtio_device_exit is overwritten by subclasses (except virtio-9p). This cleans it up by: - renaming the device_unplug callback to device_unplugged - renaming virtio_bus_plug_device to virtio_bus_device_plugged, matching the callback name - renaming virtio_bus_destroy_device to virtio_bus_device_unplugged, removing the qdev_free, making it take a VirtIODevice and calling it from virtio_device_exit - adding a k->exit callback virtio_device_exit is still overwritten, the next patches will fix that. Cc: qemu-stable@nongnu.org Acked-by: NAndreas Faerber <afaerber@suse.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
The vdev field is complicated to synchronize. Just access the BusState's list of children. Cc: qemu-stable@nongnu.org Acked-by: NAndreas Faerber <afaerber@suse.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
The vdev field is complicated to synchronize. Just access the BusState's list of children. Cc: qemu-stable@nongnu.org Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com> Acked-by: NAndreas Faerber <afaerber@suse.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
The vdev field is complicated to synchronize. Just access the BusState's list of children. Cc: qemu-stable@nongnu.org Acked-by: NAndreas Faerber <afaerber@suse.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Similar to the PCI bug that prompted these patches, virtio-ccw will segfault after the reworking of hotplug/hot-unplug. Prepare for this by moving virtio_ccw_stop_ioeventfd to before the freeing of the proxy device. A better place for this could be the device_unplugged callback for the virtio-ccw bus. However, we do not yet have a callback that works: this patch avoids the problem while leaving the tree bisectable. Cc: qemu-stable@nongnu.org Reported-by: NCornelia Huck <cornelia.huck@de.ibm.com> Suggested-by: NCornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com> Acked-by: NAndreas Faerber <afaerber@suse.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 26 11月, 2013 3 次提交
-
-
由 Alexander Graf 提交于
The default granularity for the FIT timer on 440 is on every 0x1000th transition of TB from 0 to 1. Translated that means 48828 times a second. Since interrupts are quite expensive for 440 and we don't really care about the accuracy of the FIT to that significance, let's force FIT and WDT to at best millisecond granularity. This basically restores behavior as it was in QEMU 1.6, where timers could only deal with millisecond granularities at all. This patch greatly improves performance with the 440 target and restores roughly the same performance level that QEMU 1.6 had for me. Signed-off-by: NAlexander Graf <agraf@suse.de> Message-id: 1385416015-22775-3-git-send-email-agraf@suse.de Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
-
由 Alexander Graf 提交于
Today we fire FIT and WDT timer events every time the respective bit position in TB flips from 0 -> 1. However, there is no need to do this if the end result would be that we're changing a TSR bit that is set to 1 to 1 again. No guest visible change would have occured. So whenever we see that the TSR bit to our timer is already set, don't even bother to update the timer that would potentially fire it off. However, we do need to make sure that we update our timer that notifies us of the TB flip when the respective TSR bit gets unset. In that case we do care about the flip and need to notify the guest again. So add a callback into our timer handlers when TSR bits get unset. This improves performance for me when the guest is busy processing things. Signed-off-by: NAlexander Graf <agraf@suse.de> Message-id: 1385416015-22775-2-git-send-email-agraf@suse.de Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
-
由 Michael S. Tsirkin 提交于
glib < 2.22 does not have g_array_get_element_size, limit it's use (to check all elements are 1 byte in size) to newer glib. This fixes build on RHEL 5.3. Reported-by: NRichard Henderson <rth@redhat.com> Reported-by: NErik Rull <erik.rull@rdsoftware.de> Tested-by: NRichard Henderson <rth@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Message-id: 20131125220039.GA16386@redhat.com Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
-
- 22 11月, 2013 6 次提交
-
-
由 Vlad Yasevich 提交于
It is currently possible to specify things like: -device e1000,netdev=foo,vlan=1 With this usage, whichever argument was specified last (vlan or netdev) overwrites what was previousely set and results in a non-working configuration. Even worse, when used with multiqueue devices, it causes a segmentation fault on exit in qemu_free_net_client. That patch treates the above command line options as invalid and generates an error at start-up. Signed-off-by: NVlad Yasevich <vyasevic@redhat.com> Acked-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Hervé Poussineau 提交于
MIPS Jazz chipset doesn't seem to raise data bus exceptions on invalid accesses. However, there is no easy way to prevent them. Creating a big memory region for the whole address space doesn't prevent memory core to directly call unassigned_mem_read/write which in turn call cpu->do_unassigned_access, which (for MIPS CPU) raise an data bus exception. This fixes a MIPS Jazz regression introduced in c658b94f. Signed-off-by: NHervé Poussineau <hpoussin@reactos.org> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Alex Williamson 提交于
When an assigned device is initialized it copies the device config space into the emulated config space. Unfortunately multifunction is setup prior to the device initfn and gets clobbered. We need to restore it just like pci-assign does. Cc: qemu-stable@nongnu.org Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
This causes two slight backwards-incompatibilities between "-M pc-1.5" and 1.5's "-M pc": (1) a fw_cfg file is removed with this patch. This is only a problem if migration stops the virtual machine exactly during fw_cfg enumeration. (2) after migration, a VM created without an explicit "-device pvpanic" will stop reporting panics to management. The first problem only occurs if migration is done at a very, very early point (and I'm not sure it can happen in practice for reasonable-size VMs, since it will likely take more time to send the RAM to destination, than it will take for BIOS to scan fw_cfg). The second problem only occurs if the guest panics _and_ has a guest driver _and_ management knows to look at the crash event, so it is mostly theoretical at this point in time. Thus keep the code simple, and pretend it was never broken. Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Mark Cave-Ayland 提交于
Upstream OpenBIOS now implements SBus probing in order to determine the contents of a physical bus slot, which is required to allow OpenBIOS to identify the framebuffer without help from the fw_cfg interface. SBus probing works by detecting the presence of an FCode program (effectively tokenised Forth) at the base address of each slot, and if present executes it so that it creates its own device node in the OpenBIOS device tree. The FCode ROM is generated as part of the OpenBIOS build and should generally be updated at the same time. Signed-off-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk> CC: Blue Swirl <blauwirbel@gmail.com> CC: Bob Breuer <breuerr@mc.net> CC: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Alex Williamson 提交于
When an assigned device is initialized it copies the device config space into the emulated config space. Unfortunately multifunction is setup prior to the device initfn and gets clobbered. We need to restore it just like pci-assign does. Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Reviewed-by: NBandan Das <bsd@redhat.com> Message-id: 20131112185059.7262.33780.stgit@bling.home Cc: qemu-stable@nongnu.org Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
-
- 21 11月, 2013 10 次提交
-
-
由 Hervé Poussineau 提交于
MIPS Jazz chipset doesn't seem to raise data bus exceptions on invalid accesses. However, there is no easy way to prevent them. Creating a big memory region for the whole address space doesn't prevent memory core to directly call unassigned_mem_read/write which in turn call cpu->do_unassigned_access, which (for MIPS CPU) raise an data bus exception. This fixes a MIPS Jazz regression introduced in c658b94f. Signed-off-by: NHervé Poussineau <hpoussin@reactos.org> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NHervé Poussineau <hpoussin@reactos.org> Message-id: 1383603977-7003-1-git-send-email-hpoussin@reactos.org Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
-
由 Amos Kong 提交于
If period is assigned to 0, limit timer will expire immediately. It causes a qemu warning: "main-loop: WARNING: I/O thread spun for 1000 iterations" This limit is meaningless. This patch forbids to assign 0 to period. Reviewed-by: NAmit Shah <amit.shah@redhat.com> Signed-off-by: NAmos Kong <akong@redhat.com> Message-id: 1385031203-23790-1-git-send-email-akong@redhat.com Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
-
由 Michael S. Tsirkin 提交于
pc-bios/s390-zipl.rom is a flat image so it's expected that loading it as elf will fail. It should fall back on loading a flat file, but doesn't on 32 bit systems, instead it fails printing: qemu: hardware error: could not load bootloader 's390-zipl.rom' The result is boot failure. The reason is that a 64 bit unsigned interger which is set to -1 on error is compared to -1UL which on a 32 bit system with gcc is a 32 bit unsigned interger. Since both are unsigned, no sign extension takes place and comparison evaluates to non-equal. There's no reason to do clever tricks: all functions we call actually return int so just use int. And then we can use == -1 everywhere, consistently. Reviewed-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Message-id: 20131121133426.GA30827@redhat.com Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
-
由 Michael S. Tsirkin 提交于
g_array_get_element_size was only added in glib 2.14. Fortunately we don't use it for any arrays where element size is > 1, so just add an assert. Reported-by: NRichard Henderson <rth@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Message-id: 1385036128-8753-2-git-send-email-mst@redhat.com Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
-
由 Michael S. Tsirkin 提交于
g_string_vprintf was only introduced in 2.24 so switch to vsnprintf instead. A bit uglier but name size is fixed at 4 bytes here so it's easy. Reported-by: NRichard Henderson <rth@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Message-id: 1385036128-8753-1-git-send-email-mst@redhat.com Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
-
由 Michael S. Tsirkin 提交于
This reverts commit cd5be582. Digging into hardware specs shows this does not actually make QEMU behave more like hardware: There are valid arguments backed by the spec to indicate why the version of e1000 prior to cd5be582 was more correct: the high byte actually includes a valid bit, this is why all guests write it last. For rtl8139 there's actually a separate undocumented valid bit, but we don't implement it yet. To summarize all the drivers we know about behave in one way that allows us to make an assumption about write order and avoid spurious, incorrect mac address updates to the monitor. Let's stick to the tried heuristic for 1.7 and possibly revisit for 1.8. Reported-by: NVlad Yasevich <vyasevic@redhat.com> Reviewed-by: NVlad Yasevich <vyasevic@redhat.com> Cc: Amos Kong <akong@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
g_array_get_element_size was only added in glib 2.14, there's no way to find element size in with an older glib. Fortunately we only use a single table (linker) where element size > 1. Switch element size to 1 everywhere, then we can just look at len field to get table size in bytes. Add an assert to make sure we catch any violations of this rule. Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Reported-by: NRichard Henderson <rth@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
g_string_vprintf was only introduced in 2.24 so switch to vsnprintf instead. A bit uglier but name size is fixed at 4 bytes here so it's easy. Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Reported-by: NRichard Henderson <rth@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Bandan Das 提交于
PCIBus registers a vmstate during init. Unregister it upon removal/unplug. Signed-off-by: NBandan Das <bsd@redhat.com> Cc: qemu-stable@nongnu.org Reviewed-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
pc-bios/s390-zipl.rom is a flat image so it's expected that loading it as elf will fail. It should fall back on loading a flat file, but doesn't on 32 bit systems, instead it fails printing: qemu: hardware error: could not load bootloader 's390-zipl.rom' The result is boot failure. The reason is that a 64 bit unsigned interger which is set to -1 on error is compared to -1UL which on a 32 bit system with gcc is a 32 bit unsigned interger. Since both are unsigned, no sign extension takes place and comparison evaluates to non-equal. There's no reason to do clever tricks: all functions we call actually return int so just use int. And then we can use == -1 everywhere, consistently. Reviewed-by: NAlexander Graf <agraf@suse.de> Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 20 11月, 2013 1 次提交
-
-
由 Sebastian Macke 提交于
The clock value is only evaluated when really necessary reducing the overhead of the timer handling. This also solves a problem in the way the Linux kernel handles the timer and the expected accuracy. The old version could lead to inaccurate timings. Signed-off-by: NSebastian Macke <sebastian@macke.de> Reviewed-by: NJia Liu <proljc@gmail.com> Signed-off-by: NJia Liu <proljc@gmail.com>
-
- 19 11月, 2013 1 次提交
-
-
由 Amos Kong 提交于
object_get_canonical_path() returns a gchar*, it should be freed by the caller. Signed-off-by: NAmos Kong <akong@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NVlad Yasevich <vyasevic@redhat.com> Reviewed-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 17 11月, 2013 1 次提交
-
-
由 Michael Tokarev 提交于
$(PYTHON) is a Make variable which is set by configure. In all other places over the tree, .py files are run from Makefiles using this variable, except of a single leftover in hw/i386/Makefile.obj (and a nearby place in there uses $(PYTHON) correctly). Fix this leftover too. Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru> Cc: Luigi Rizzo <rizzo@iet.unipi.it> Reviewed-by: N: Stefan Weil <sw@weilnetz.de>
-
- 15 11月, 2013 1 次提交
-
-
由 Sebastian Huber 提交于
In case the smc91c111 interface signals that it cannot receive more packets the packets are queued and further reception will be disabled. In case the interface is again ready to receive packets notify the upper layer. Signed-off-by: NSebastian Huber <sebastian.huber@embedded-brains.de> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 14 11月, 2013 1 次提交
-
-
由 Igor Mammedov 提交于
The BIOS that we ship in 1.7 does not use pci info from host and so far isn't going to use it. Taking in account problems it caused see 9604f70f and to avoid future incompatibility issues, it's safest to disable that interface by default for all machine types including 1.7 as it was never exposed/used by guest. And properly remove/cleanup it during 1.8 development cycle. Signed-off-by: NIgor Mammedov <imammedo@redhat.com> Reviewed-by: NGerd Hoffmann <kraxel@redhat.com> Reviewed-by: NMichael S. Tsirkin <mst@redhat.com> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-