Branch: refs/heads/master Home: https://github.com/qemu/qemu Commit: 85e05d825f7a9ecc1b5100bdd553fcc682c8366e https://github.com/qemu/qemu/commit/85e05d825f7a9ecc1b5100bdd553fcc682c8366e Author: Gerd Hoffmann <kra...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012)
Changed paths: M hw/usb/hcd-xhci.c Log Message: ----------- xhci: add {get,set}_field macros & enum for pls Add {get,set}_field macros (simliar to ehci) to read and update some bits of a word. Put them into use for updating pls (port link state) values. Also add a enum for pls values. Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: f321402785f443d7b95e746aae686e28d74e344c https://github.com/qemu/qemu/commit/f321402785f443d7b95e746aae686e28d74e344c Author: Gerd Hoffmann <kra...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/hcd-xhci.c Log Message: ----------- xhci: s/xhci_update_port/xhci_port_update/ Rename the function for xhci_port_* naming scheme, also drop the xhci parameter as port carries a pointer to xhci anyway. Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 6a32f80f056b577d275268e4f6f3477ba721c94f https://github.com/qemu/qemu/commit/6a32f80f056b577d275268e4f6f3477ba721c94f Author: Gerd Hoffmann <kra...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/hcd-xhci.c Log Message: ----------- xhci: add xhci_port_have_device Factor out the code which checks whenever a usb device is attached to the port in question. No functional change. Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: f705a362800733c363f0458f75942f8dc61b7abb https://github.com/qemu/qemu/commit/f705a362800733c363f0458f75942f8dc61b7abb Author: Gerd Hoffmann <kra...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/hcd-xhci.c Log Message: ----------- xhci: add xhci_port_notify Create a function to notify the guest about port status changes and put it into use. Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 40030130d167f2bf762155a1a7e0073de5545e8b https://github.com/qemu/qemu/commit/40030130d167f2bf762155a1a7e0073de5545e8b Author: Gerd Hoffmann <kra...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/hcd-xhci.c Log Message: ----------- xhci: add xhci_port_reset Move port reset logic to its own function. Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: b62b08282d9539a109b02e217d0cc7f7dcdb87ac https://github.com/qemu/qemu/commit/b62b08282d9539a109b02e217d0cc7f7dcdb87ac Author: Gerd Hoffmann <kra...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/hcd-xhci.c Log Message: ----------- xhci: set pls in xhci_port_update & xhci_port_reset Set the port link state to the correct values in xhci_port_update and xhci_port_reset functions. Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 4f47f0f82eccbda44bac929df94fa244bf3452bd https://github.com/qemu/qemu/commit/4f47f0f82eccbda44bac929df94fa244bf3452bd Author: Gerd Hoffmann <kra...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/hcd-xhci.c M trace-events Log Message: ----------- xhci: add port trace points Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 0bc85da69e01f25c27f575ef0d57d29be4154d71 https://github.com/qemu/qemu/commit/0bc85da69e01f25c27f575ef0d57d29be4154d71 Author: Gerd Hoffmann <kra...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/hcd-xhci.c Log Message: ----------- xhci: allow address slot being called multiple times win8 guests do that for some reason ... Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 27a11324e07f23587abfac3f0fd2fd6fb536aa74 https://github.com/qemu/qemu/commit/27a11324e07f23587abfac3f0fd2fd6fb536aa74 Author: Peter Crosthwaite <peter.crosthwa...@xilinx.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/hcd-ehci.c Log Message: ----------- usb/ehci: parameterise the register region offsets The capabilities register and operational register offsets can vary from one EHCI implementation to the next. Parameterise accordingly. Signed-off-by: Peter Crosthwaite <peter.crosthwa...@xilinx.com> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 7ae6ce0258096d3ad974d274aafcf130d5a31bb7 https://github.com/qemu/qemu/commit/7ae6ce0258096d3ad974d274aafcf130d5a31bb7 Author: Peter Crosthwaite <peter.crosthwa...@xilinx.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/hcd-ehci.c Log Message: ----------- usb/ehci: Abstract away PCI DMA API Pull the DMAContext for the PCI DMA out at device init time and put it into the device state. Use dma_memory_read/write() instead of pci specific versions. Signed-off-by: Peter Crosthwaite <peter.crosthwa...@xilinx.com> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 5010d4dc618b6b8e7c21129c487c06f6493f71fc https://github.com/qemu/qemu/commit/5010d4dc618b6b8e7c21129c487c06f6493f71fc Author: Peter Crosthwaite <peter.crosthwa...@xilinx.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/hcd-ehci.c Log Message: ----------- usb/ehci: seperate out PCIisms Seperate the PCI stuff from the EHCI components. Extracted the PCIDevice out into a new wrapper struct to make EHCIState non-PCI-specific. Seperated tho non PCI init component out into a seperate "common" init function. Signed-off-by: Peter Crosthwaite <peter.crosthwa...@xilinx.com> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 569c7fc8400ea3a7b13589af889003208aaae2ed https://github.com/qemu/qemu/commit/569c7fc8400ea3a7b13589af889003208aaae2ed Author: Peter Crosthwaite <peter.crosthwa...@xilinx.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/hcd-ehci.c Log Message: ----------- usb/ehci: Guard definition of EHCI_DEBUG Guard against re-definition of EHCI_DEBUG. Allows for turning on of debug info from configure (using --qemu-extra-cflags="-DEHCI_DEBUG=1") rather than source code hacking. Signed-off-by: Peter Crosthwaite <peter.crosthwa...@xilinx.com> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 0bf96f9457cdaf620bb8195a971bbdcc732ba32b https://github.com/qemu/qemu/commit/0bf96f9457cdaf620bb8195a971bbdcc732ba32b Author: Gerd Hoffmann <kra...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/Makefile.objs A hw/usb/hcd-ehci-pci.c M hw/usb/hcd-ehci.c A hw/usb/hcd-ehci.h Log Message: ----------- usb/ehci: split into multiple source files Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: e433785a768391795e88fbbdd75bbd34859666d3 https://github.com/qemu/qemu/commit/e433785a768391795e88fbbdd75bbd34859666d3 Author: Gerd Hoffmann <kra...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/Makefile.objs A hw/usb/hcd-ehci-sysbus.c Log Message: ----------- usb/ehci: add sysbus variant Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 892776ce02e3915b8db9d85935ea144ee5a1a41a https://github.com/qemu/qemu/commit/892776ce02e3915b8db9d85935ea144ee5a1a41a Author: Peter Crosthwaite <peter.crosthwa...@xilinx.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/xilinx_zynq.c Log Message: ----------- xilinx_zynq: add USB controllers Add the two usb controllers in Zynq. Signed-off-by: Peter Crosthwaite <peter.crosthwa...@xilinx.com> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 2c2e852509de3fecf606e8f2dcbca0ebd1eddc10 https://github.com/qemu/qemu/commit/2c2e852509de3fecf606e8f2dcbca0ebd1eddc10 Author: Gerd Hoffmann <kra...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/hcd-uhci.c Log Message: ----------- uhci: dynamic type generation Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 8f3f90b0c7d095ba11b1ad558a0b7c2eeb36c8dc https://github.com/qemu/qemu/commit/8f3f90b0c7d095ba11b1ad558a0b7c2eeb36c8dc Author: Gerd Hoffmann <kra...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/hcd-uhci.c Log Message: ----------- uhci: stick irq routing info into UHCIInfo too. Kills the ugly "switch (device_id) { ... }" struct and makes it easier to figure what the differences between the uhci variants are. Need our own DeviceClass struct for that so we can allocate some space to store UHCIInfo. Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 74625ea27c39df7047ebefb11c4a04c3a3513f16 https://github.com/qemu/qemu/commit/74625ea27c39df7047ebefb11c4a04c3a3513f16 Author: Gerd Hoffmann <kra...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/hcd-uhci.c Log Message: ----------- uhci: add ich9 00:1a.* variants Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: df013187777efc62faeea979cfec2ca4470cc34b https://github.com/qemu/qemu/commit/df013187777efc62faeea979cfec2ca4470cc34b Author: Gerd Hoffmann <kra...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/hcd-ehci-pci.c Log Message: ----------- usb/ehci-pci: dynamic type generation Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: ba07630c79807147786d3fd033e2762ae84eb132 https://github.com/qemu/qemu/commit/ba07630c79807147786d3fd033e2762ae84eb132 Author: Gerd Hoffmann <kra...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/hcd-ehci-pci.c Log Message: ----------- usb/ehci-pci: add ich9 00:1a.* variant Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: bb4d2b2f0aad4a940db86eb469de0bf91c1c6837 https://github.com/qemu/qemu/commit/bb4d2b2f0aad4a940db86eb469de0bf91c1c6837 Author: Gerd Hoffmann <kra...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb.h M hw/usb/hcd-ehci-pci.c Log Message: ----------- usb/ehci-pci: add helper to create ich9 usb controllers Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: faccca000f27bb63fce0c71dc4ca68be1c23a8b0 https://github.com/qemu/qemu/commit/faccca000f27bb63fce0c71dc4ca68be1c23a8b0 Author: Hans de Goede <hdego...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/hcd-uhci.c Log Message: ----------- uhci: Add a uhci_handle_td_error() helper function Signed-off-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 7f102ebeb5bad7b723a25557234b0feb493f6134 https://github.com/qemu/qemu/commit/7f102ebeb5bad7b723a25557234b0feb493f6134 Author: Hans de Goede <hdego...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/hcd-uhci.c Log Message: ----------- uhci: Don't crash on device disconnect My recent uhci cleanup series has introduced a regression, where qemu sometimes crashes on a device disconnect. The problem is that the uhci code never checked for a device not / no longer existing, instead it was relying on usb_handle_packet accepting a NULL device. But since we now pass usb_handle_packet q->ep->dev, rather then just a local dev variable, we crash as q->ep == NULL due to the device no longer existing. This patch fixes this. Note that this patch also improves over the old behavior were we would: 1) create a queue for the device 2) create an async for the packet 3) have usb_handle_packet fail 4) destroy the async 5) wait for the queue to be idle for 32 frames 6) destroy the queue Which was rather sub-optimal. Signed-off-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: a552a966f16b7b39c5df16fc17e12d02c4fa5954 https://github.com/qemu/qemu/commit/a552a966f16b7b39c5df16fc17e12d02c4fa5954 Author: Hans de Goede <hdego...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb.h M hw/usb/Makefile.objs A hw/usb/combined-packet.c M hw/usb/core.c Log Message: ----------- usb: Add packet combining functions Currently we only do pipelining for output endpoints, since to properly support short-not-ok semantics we can only have one outstanding input packet. Since the ehci and uhci controllers have a limited per td packet size guests will split large input transfers to into multiple packets, and since we don't pipeline these, this comes with a serious performance penalty. This patch adds helper functions to (re-)combine packets which belong to 1 transfer at the guest device-driver level into 1 large transger. This can be used by (redirection) usb-devices to enable pipelining for input endpoints. This patch will combine packets together until a transfer terminating packet is encountered. A terminating packet is a packet which meets one or more of the following conditions: 1) The packet size is *not* a multiple of the endpoint max packet size 2) The packet does *not* have its short-not-ok flag set 3) The packet has its interrupt-on-complete flag set The short-not-ok flag of the combined packet is that of the terminating packet. Multiple combined packets may be submitted to the device, if the combined packets do not have their short-not-ok flag set, enabling true pipelining. If a combined packet does have its short-not-ok flag set the queue will wait with submitting further packets to the device until that packet has completed. Once enabled in the usb-redir and ehci code, this improves the speed (MB/s) of a Linux guest reading from a USB mass storage device by a factor of 1.2 - 1.5. And the main reason why I started working on this, when reading from a pl2303 USB<->serial converter, it combines the previous 4 packets submitted per device-driver level read into 1 big read, reducing the number of packets / sec by a factor 4, and it allows to have multiple reads outstanding. This allows for much better latency tolerance without the pl2303's internal buffer overflowing (which was happening at 115200 bps, without serial flow control). Signed-off-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 579967bea69bf1b32faee13ff76b19ba641a2618 https://github.com/qemu/qemu/commit/579967bea69bf1b32faee13ff76b19ba641a2618 Author: Hans de Goede <hdego...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/combined-packet.c Log Message: ----------- combined-packet: Add a workaround for Linux usbfs + live migration Older versions (anything but the latest) of Linux usbfs + libusb(x), will submit larger (bulk) transfers split into multiple 16k submissions, which means that rather then all tds getting linked into the queue in one atomic operarion they get linked in a bunch at a time, which could cause problems if: 1) We scan the queue while libusb is in the middle of submitting a split bulk transfer 2) While this bulk transfer is pending we migrate to another host. The problem is that after 2, the new host will rescan the queue and combine the packets in one large transfer, where as 1) has caused the original host to see them as 2 transfers. This patch fixes this by stopping combinging if we detect a 16k transfer with its int_req flag set. This should not adversely effect performance for other cases as: 1) Linux never sets the interrupt flag on packets other then the last 2) Windows does set the in_req flag on each td, but will submit large transfers in 20k tds thus never triggering the check Signed-off-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: c19a798133e936a15ee0175ebc973d777c4c62ed https://github.com/qemu/qemu/commit/c19a798133e936a15ee0175ebc973d777c4c62ed Author: Hans de Goede <hdego...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M configure M hw/usb/redirect.c Log Message: ----------- usb-redir: Add support for 32 bits bulk packet length Signed-off-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 1b36c4d826b586de40efd0c2d3c269b14ca8e150 https://github.com/qemu/qemu/commit/1b36c4d826b586de40efd0c2d3c269b14ca8e150 Author: Hans de Goede <hdego...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/redirect.c Log Message: ----------- usb-redir: Add support for input pipelining Signed-off-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 7e03d1781690c9e9ad67a671237dbcc0d159f528 https://github.com/qemu/qemu/commit/7e03d1781690c9e9ad67a671237dbcc0d159f528 Author: Hans de Goede <hdego...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/redirect.c Log Message: ----------- usb-redir: Add an usbredir_setup_usb_eps() helper function Signed-off-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 24ac283aa293f9bd8ca4137775506edf33e45eae https://github.com/qemu/qemu/commit/24ac283aa293f9bd8ca4137775506edf33e45eae Author: Hans de Goede <hdego...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/redirect.c Log Message: ----------- usb-redir: Use reject rather the disconnect on bad ep info So that the client gets a notification about us disconnecting the device. Signed-off-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: cdfd3530fafbef441ab6b86da64151f74073e5bd https://github.com/qemu/qemu/commit/cdfd3530fafbef441ab6b86da64151f74073e5bd Author: Jan Kiszka <jan.kis...@siemens.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/redirect.c Log Message: ----------- usb-redir: Allow to attach USB 2.0 devices to 1.1 host controller This follows the logic of host-linux: If a 2.0 device has no ISO endpoint and no interrupt endpoint with a packet size > 64, we can attach it also to an 1.1 host controller. In case the redir server does not report endpoint sizes, play safe and remove the 1.1 compatibility as well. Moreover, if we detect a conflicting change in the configuration after the device was already attached, it will be disconnected immediately. HdG: Several small cleanups and fixes Signed-off-by: Jan Kiszka <jan.kis...@siemens.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 95a59dc03988d190bbc72d980a149be3a79592fb https://github.com/qemu/qemu/commit/95a59dc03988d190bbc72d980a149be3a79592fb Author: Hans de Goede <hdego...@redhat.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M hw/usb/redirect.c Log Message: ----------- usb-redir: Allow redirecting super speed devices to high speed controllers Signed-off-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: de0a36cd01dab524ee6507c1bd644f0775d341fe https://github.com/qemu/qemu/commit/de0a36cd01dab524ee6507c1bd644f0775d341fe Author: Anthony Liguori <aligu...@us.ibm.com> Date: 2012-11-01 (Thu, 01 Nov 2012) Changed paths: M configure M hw/usb.h M hw/usb/Makefile.objs A hw/usb/combined-packet.c M hw/usb/core.c A hw/usb/hcd-ehci-pci.c A hw/usb/hcd-ehci-sysbus.c M hw/usb/hcd-ehci.c A hw/usb/hcd-ehci.h M hw/usb/hcd-uhci.c M hw/usb/hcd-xhci.c M hw/usb/redirect.c M hw/xilinx_zynq.c M trace-events Log Message: ----------- Merge remote-tracking branch 'kraxel/usb.69' into staging * kraxel/usb.69: (31 commits) usb-redir: Allow redirecting super speed devices to high speed controllers usb-redir: Allow to attach USB 2.0 devices to 1.1 host controller usb-redir: Use reject rather the disconnect on bad ep info usb-redir: Add an usbredir_setup_usb_eps() helper function usb-redir: Add support for input pipelining usb-redir: Add support for 32 bits bulk packet length combined-packet: Add a workaround for Linux usbfs + live migration usb: Add packet combining functions uhci: Don't crash on device disconnect uhci: Add a uhci_handle_td_error() helper function usb/ehci-pci: add helper to create ich9 usb controllers usb/ehci-pci: add ich9 00:1a.* variant usb/ehci-pci: dynamic type generation uhci: add ich9 00:1a.* variants uhci: stick irq routing info into UHCIInfo too. uhci: dynamic type generation xilinx_zynq: add USB controllers usb/ehci: add sysbus variant usb/ehci: split into multiple source files usb/ehci: Guard definition of EHCI_DEBUG ... Signed-off-by: Anthony Liguori <aligu...@us.ibm.com> Commit: dc63936df7cc4c6f07b8c8c4ba0bf177b8df085e https://github.com/qemu/qemu/commit/dc63936df7cc4c6f07b8c8c4ba0bf177b8df085e Author: Gerd Hoffmann <kra...@redhat.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M hw/xenfb.c Log Message: ----------- xenfb: fix build breakage caused by console cleanup series Console cleanup series renamed dpy_resize and dpy_update all over the tree, but hw/xenfb.c was forgotten. Update it too so it builds again. Reported-by: Jan Kiszka <jan.kis...@web.de> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Signed-off-by: Anthony Liguori <aligu...@us.ibm.com> Commit: 1d8ddda045b4b72dc95a325debb6df0fc19ec821 https://github.com/qemu/qemu/commit/1d8ddda045b4b72dc95a325debb6df0fc19ec821 Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M ui/cocoa.m Log Message: ----------- ui/cocoa.m: Update to new DisplayChangeListener member names Commit a93a4a2 changed the names of some fields in DisplayChangeListener and broke compilation of the cocoa UI. Update to the new names. Acked-by: Gerd Hoffmann <kra...@redhat.com> Reviewed-by: Andreas Färber <andreas.faer...@web.de> Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Signed-off-by: Anthony Liguori <aligu...@us.ibm.com> Commit: e4ab0d6b0d1118a90238d8194eedb91aab15ebe1 https://github.com/qemu/qemu/commit/e4ab0d6b0d1118a90238d8194eedb91aab15ebe1 Author: Eduardo Habkost <ehabk...@redhat.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M target-i386/cpu.c Log Message: ----------- target-i386: cpu: fix --disable-kvm compilation This fixes the following: target-i386/cpu.o: In function `kvm_cpu_fill_host': target-i386/cpu.c:783: undefined reference to `kvm_state' I didn't notice the problem before because GCC was optimizing the entire kvm_cpu_fill_host() function out (because all calls are conditional on kvm_enabled()). * cpu_x86_fill_model_id() is used only if CONFIG_KVM is set, so #ifdef it entirely to avoid compiler warnings. * kvm_cpu_fill_host() should be called only if KVM is enabled, so use #ifdef CONFIG_KVM around the entire function body. Reported-by: Andreas Färber <afaer...@suse.de> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> Signed-off-by: Andreas Färber <afaer...@suse.de> Commit: 5f0ebf1b4d58be0c0bb05beb195b6f42942eeee8 https://github.com/qemu/qemu/commit/5f0ebf1b4d58be0c0bb05beb195b6f42942eeee8 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M savevm.c Log Message: ----------- migration: unify stdio-based QEMUFile operations Now that qemu_fseek does not exist anymore, there is no reason to do an fseek before fread/fwrite when operating on an stdio file. Thus, unify the get/put_buffer callbacks used by qemu_fopen with those used for pipes. Reviewed-by: Orit Wasserman <owass...@redhat.com> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 9229bf3c2d7afcd1adce7258843d9bc82b066b08 https://github.com/qemu/qemu/commit/9229bf3c2d7afcd1adce7258843d9bc82b066b08 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M buffered_file.c M qemu-file.h M savevm.c Log Message: ----------- migration: consolidate QEMUFile methods in a single QEMUFileOps struct Reviewed-by: Orit Wasserman <owass...@redhat.com> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 70eb6330343ebc61e5fb22be3d137df40f4bb058 https://github.com/qemu/qemu/commit/70eb6330343ebc61e5fb22be3d137df40f4bb058 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M buffered_file.c M qemu-file.h M savevm.c Log Message: ----------- migration: add qemu_get_fd Reviewed-by: Orit Wasserman <owass...@redhat.com> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: d263a20bcfc94a59c87176df6c2d29d65a7e4e6a https://github.com/qemu/qemu/commit/d263a20bcfc94a59c87176df6c2d29d65a7e4e6a Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M migration-exec.c M migration-fd.c M qemu-file.h M savevm.c Log Message: ----------- migration: replace qemu_stdio_fd with qemu_get_fd Reviewed-by: Orit Wasserman <owass...@redhat.com> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: a6ef29096b89640acaa5edc3a74c2e3efbfa306f https://github.com/qemu/qemu/commit/a6ef29096b89640acaa5edc3a74c2e3efbfa306f Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M migration-exec.c M migration-fd.c M migration-tcp.c M migration-unix.c Log Message: ----------- migration: clean up server sockets and handlers before invoking process_incoming_migration A first step towards making a common "suffix" for all migration protocols, and moving it to process_incoming_migration. Reviewed-by: Orit Wasserman <owass...@redhat.com> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 8dc592e620b45c4745380b0694ec1aedc073bda2 https://github.com/qemu/qemu/commit/8dc592e620b45c4745380b0694ec1aedc073bda2 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M migration.c Log Message: ----------- migration: use migrate_fd_close in migrate_fd_cleanup migrate_fd_cleanup will usually close the file descriptor via buffered_file_close's call to migrate_fd_close. However, in the case of s->file == NULL it is "inlining" migrate_fd_close (almost: there is a direct close() instead of using s->close(s)). To fix the inconsistency and clean up the code, allow multiple calls to migrate_fd_close and use the function in migrate_fd_cleanup. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 09bac73c13b57acd304efb54a361c244d60d375c https://github.com/qemu/qemu/commit/09bac73c13b57acd304efb54a361c244d60d375c Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M migration-tcp.c Log Message: ----------- migration: use closesocket, not close Windows requires this. Migration does not quite work under Windows but let's be uniform across QEMU. Reviewed-by: Orit Wasserman <owass...@redhat.com> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 6c3601361ff22cb8bda3f483ea11c4f7bd095094 https://github.com/qemu/qemu/commit/6c3601361ff22cb8bda3f483ea11c4f7bd095094 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M migration-exec.c M migration-fd.c M migration-tcp.c M migration-unix.c Log Message: ----------- migration: xxx_close will only be called once No need to test s->fd again, it is tested in the caller. Reviewed-by: Orit Wasserman <owass...@redhat.com> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: ab52a824a496f4459539a9a11152d6da68703ea0 https://github.com/qemu/qemu/commit/ab52a824a496f4459539a9a11152d6da68703ea0 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M migration-tcp.c M migration-unix.c M savevm.c Log Message: ----------- migration: close socket QEMUFile from socket_close The common suffix now is process_incoming_migration+qemu_fclose. Reviewed-by: Orit Wasserman <owass...@redhat.com> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 1c12e1f5b2ce215ee25b4a4e365e76269edf911c https://github.com/qemu/qemu/commit/1c12e1f5b2ce215ee25b4a4e365e76269edf911c Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M migration-exec.c M migration-fd.c M migration-tcp.c M migration-unix.c M migration.c Log Message: ----------- migration: move qemu_fclose to process_incoming_migration The common suffix is now just process_incoming_migration. Reviewed-by: Orit Wasserman <owass...@redhat.com> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 595ab64169be9063d64c3b1aa1c249fbe2662221 https://github.com/qemu/qemu/commit/595ab64169be9063d64c3b1aa1c249fbe2662221 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M savevm.c Log Message: ----------- migration: handle EAGAIN while reading QEMUFile This will never happen right now (the assertion would fail). The next patch will set the socket or pipe in non-blocking mode, thus enabling this part of the code. Coroutines can just stop whenever they want with qemu_coroutine_yield. As soon as select tells the main loop that the migration stream is readable, the coroutine is re-entered directly in qemu_get_buffer, where it will read more data and pass it to the loading routines. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 82a4da79fd6c108400637143f8439c2364bdb21e https://github.com/qemu/qemu/commit/82a4da79fd6c108400637143f8439c2364bdb21e Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M migration.c Log Message: ----------- migration: move process_incoming_migration to a coroutine The final part of incoming migration, which now consists of process_incoming_migration for all protocols, is thus made non-blocking. Reviewed-by: Orit Wasserman <owass...@redhat.com> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Commit: 1ef2a82e8f60779bebdae59f7dad8205cc93db30 https://github.com/qemu/qemu/commit/1ef2a82e8f60779bebdae59f7dad8205cc93db30 Author: Anthony Liguori <aligu...@us.ibm.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M target-i386/cpu.c Log Message: ----------- Merge remote-tracking branch 'afaerber/qom-cpu' into staging Signed-off-by: Anthony Liguori <aligu...@us.ibm.com> * afaerber/qom-cpu: target-i386: cpu: fix --disable-kvm compilation Commit: 2a0dfd004d9fae4adf2ccfcb2e3b1a76906b48a0 https://github.com/qemu/qemu/commit/2a0dfd004d9fae4adf2ccfcb2e3b1a76906b48a0 Author: Anthony Liguori <aligu...@us.ibm.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M buffered_file.c M migration-exec.c M migration-fd.c M migration-tcp.c M migration-unix.c M migration.c M qemu-file.h M savevm.c Log Message: ----------- Merge remote-tracking branch 'bonzini/migr-coroutine' into staging Signed-off-by: Anthony Liguori <aligu...@us.ibm.com> * bonzini/migr-coroutine: migration: move process_incoming_migration to a coroutine migration: handle EAGAIN while reading QEMUFile migration: move qemu_fclose to process_incoming_migration migration: close socket QEMUFile from socket_close migration: xxx_close will only be called once migration: use closesocket, not close migration: use migrate_fd_close in migrate_fd_cleanup migration: clean up server sockets and handlers before invoking process_incoming_migration migration: replace qemu_stdio_fd with qemu_get_fd migration: add qemu_get_fd migration: consolidate QEMUFile methods in a single QEMUFileOps struct migration: unify stdio-based QEMUFile operations Commit: 1f001dc7bc9e435bf231a5b0edcad1c7c2bd6214 https://github.com/qemu/qemu/commit/1f001dc7bc9e435bf231a5b0edcad1c7c2bd6214 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M compiler.h M osdep.c M oslib-win32.c M qemu-sockets.c M qmp.c Log Message: ----------- compiler: support Darwin weak references Weakrefs only tell you if the symbol was defined elsewhere, so you need a further check at runtime to pick the default definition when needed. This could be automated by the compiler, but it does not do it. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Anthony Liguori <aligu...@us.ibm.com> Commit: c166cb72f1676855816340666c3b618beef4b976 https://github.com/qemu/qemu/commit/c166cb72f1676855816340666c3b618beef4b976 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M qemu-thread-posix.c M qemu-thread-posix.h Log Message: ----------- semaphore: implement fallback counting semaphores with mutex+condvar OpenBSD and Darwin do not have sem_timedwait. Implement a fallback for them. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Anthony Liguori <aligu...@us.ibm.com> Commit: c8122c35e611385b31e2d8ccb059d0687540244a https://github.com/qemu/qemu/commit/c8122c35e611385b31e2d8ccb059d0687540244a Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M qemu-timer.c Log Message: ----------- qemu-timer: reinitialize timers after fork Timers are not inherited by the child of a fork(2), so just use pthread_atfork to reinstate them after daemonize. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Anthony Liguori <aligu...@us.ibm.com> Commit: f9ab4654e370ceedb745523b607a628e297cb6ab https://github.com/qemu/qemu/commit/f9ab4654e370ceedb745523b607a628e297cb6ab Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M main-loop.c M vl.c Log Message: ----------- vl: unify calls to init_timer_alarm init_timer_alarm was being called twice. This is not needed. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Anthony Liguori <aligu...@us.ibm.com> Commit: 49cf57281b74ccb64587ccc0626fc55a01227a15 https://github.com/qemu/qemu/commit/49cf57281b74ccb64587ccc0626fc55a01227a15 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2012-11-02 (Fri, 02 Nov 2012) Changed paths: M main-loop.c M vl.c Log Message: ----------- vl: delay thread initialization after daemonization Commit ac4119c (chardev: Use timer instead of bottom-half to postpone open event, 2012-10-12) moved the alarm timer initialization to an earlier point but failed to consider that it depends on qemu_init_main_loop. Later, commit 1c53786 (vl: init main loop earlier, 2012-10-30) fixed this, but left -daemonize in two different ways. First, timers need to be reinitialized after forking. Second, the global mutex was being held by the parent, and thus dropped after forking. The first is now fixed using pthread_atfork. For the second part, make sure that the global mutex is not taken before daemonization, and similarly delay qemu_thread_self. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Anthony Liguori <aligu...@us.ibm.com> Compare: https://github.com/qemu/qemu/compare/4ba79505f43b...49cf57281b74