summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* sun4c: remove unused functionsBlue Swirl2012-11-102-27/+0
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* m48t59: remove unused m48t59_set_addrBlue Swirl2012-11-102-8/+0
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vmware_vga: Add back some info in local state partially reverting aa32b38cBALATON Zoltan2012-11-101-9/+21
| | | | | | | | | | | Keep saving display surface parameters at init and using these cached values instead of getting them when needed. Not sure why this is needed (maybe due to the interaction with the vga device) but not doing this broke the Xorg vmware driver at least. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Tested-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* kvmvapic: Fix TB invalidation after instruction patchingJan Kiszka2012-11-101-4/+16
| | | | | | | | | | | | | | | Since 0b57e287, cpu_memory_rw_debug already triggers a TB invalidation. As it doesn't (and cannot) set is_cpu_write_access=1 but "consumes" the currently executed TB, the tb_invalidate_phys_page_range call from patch_instruction didn't work anymore. Fix this by open-coding the required bits to restore the CPU state from the current TB position before patching and resume execution on the patched instruction afterward. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Tested-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vmware_vga: Allow simple drivers to work without using the fifoBALATON Zoltan2012-11-033-14/+23
| | | | | | | | | | | Postpone stopping the dirty log to the point where the command fifo is configured to allow drivers which don't use the fifo to work too. (Without this the picture rendered into the vram never got to the screen and the DIRECT_VRAM option meant to support this case was removed a year ago.) Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vmware_vga: Return a value for FB_SIZE before the device is enabledBALATON Zoltan2012-11-031-10/+9
| | | | | | | | | | | According to the documentation drivers using this device should read FB_SIZE before enabling the device to know what memory to map. This would not work if we return 0 before enabled. The docs also mention reading SVGA_REG_DEPTH but not writing it. (Only SVGA_REG_BITS_PER_PIXEL can be written but we don't really support that either.) Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vmware_vga: Remove duplicated info from local stateBALATON Zoltan2012-11-031-94/+65
| | | | | | | | Removed info from vmsvga_state that is available from elsewhere and thus was duplicated here unnecessarily. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vmware_vga: Coding style cleanupBALATON Zoltan2012-11-031-124/+150
| | | | | | | Fix coding style as suggested by checkpatch.pl Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Merge branch 'trivial-patches' of git://github.com/stefanha/qemuBlue Swirl2012-11-036-30/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'trivial-patches' of git://github.com/stefanha/qemu: pc: Drop redundant test for ROM memory region exec: make some functions static target-ppc: make some functions static ppc: add missing static vnc: add missing static vl.c: add missing static target-sparc: make do_unaligned_access static m68k: Return semihosting errno values correctly cadence_uart: More debug information Conflicts: target-m68k/m68k-semi.c
| * pc: Drop redundant test for ROM memory regionJan Kiszka2012-11-011-1/+1
| | | | | | | | | | | | | | Just a few lines above, we already initialize rom_memory accordingly. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * ppc: add missing staticBlue Swirl2012-11-014-25/+13
| | | | | | | | | | | | | | | | Add missing 'static' qualifiers. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * cadence_uart: More debug informationPeter Crosthwaite2012-11-011-4/+7
| | | | | | | | | | | | | | | | Add more helpful debug information to the cadence UART. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | xenfb: fix build breakage caused by console cleanup seriesGerd Hoffmann2012-11-021-2/+2
| | | | | | | | | | | | | | | | | | 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.kiszka@web.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | Merge remote-tracking branch 'kraxel/usb.69' into stagingAnthony Liguori2012-11-0112-680/+1232
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 <aliguori@us.ibm.com>
| * | usb-redir: Allow redirecting super speed devices to high speed controllersHans de Goede2012-11-011-2/+21
| | | | | | | | | | | | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-redir: Allow to attach USB 2.0 devices to 1.1 host controllerJan Kiszka2012-11-011-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.kiszka@siemens.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-redir: Use reject rather the disconnect on bad ep infoHans de Goede2012-11-011-2/+3
| | | | | | | | | | | | | | | | | | | | | So that the client gets a notification about us disconnecting the device. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-redir: Add an usbredir_setup_usb_eps() helper functionHans de Goede2012-11-011-23/+22
| | | | | | | | | | | | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-redir: Add support for input pipeliningHans de Goede2012-11-011-10/+53
| | | | | | | | | | | | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-redir: Add support for 32 bits bulk packet lengthHans de Goede2012-11-011-1/+6
| | | | | | | | | | | | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | combined-packet: Add a workaround for Linux usbfs + live migrationHans de Goede2012-11-011-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb: Add packet combining functionsHans de Goede2012-11-014-1/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | uhci: Don't crash on device disconnectHans de Goede2012-11-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | uhci: Add a uhci_handle_td_error() helper functionHans de Goede2012-11-011-43/+47
| | | | | | | | | | | | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb/ehci-pci: add helper to create ich9 usb controllersGerd Hoffmann2012-11-012-0/+55
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb/ehci-pci: add ich9 00:1a.* variantGerd Hoffmann2012-11-011-1/+6
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb/ehci-pci: dynamic type generationGerd Hoffmann2012-11-011-31/+35
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | uhci: add ich9 00:1a.* variantsGerd Hoffmann2012-11-011-3/+24
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | uhci: stick irq routing info into UHCIInfo too.Gerd Hoffmann2012-11-011-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <kraxel@redhat.com>
| * | uhci: dynamic type generationGerd Hoffmann2012-11-011-126/+70
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | xilinx_zynq: add USB controllersPeter Crosthwaite2012-11-011-0/+3
| | | | | | | | | | | | | | | | | | | | | Add the two usb controllers in Zynq. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb/ehci: add sysbus variantGerd Hoffmann2012-11-012-1/+78
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb/ehci: split into multiple source filesGerd Hoffmann2012-11-014-424/+462
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb/ehci: Guard definition of EHCI_DEBUGPeter Crosthwaite2012-11-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.crosthwaite@xilinx.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb/ehci: seperate out PCIismsPeter Crosthwaite2012-11-011-52/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.crosthwaite@xilinx.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb/ehci: Abstract away PCI DMA APIPeter Crosthwaite2012-11-011-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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.crosthwaite@xilinx.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb/ehci: parameterise the register region offsetsPeter Crosthwaite2012-11-011-32/+36
| | | | | | | | | | | | | | | | | | | | | | | | The capabilities register and operational register offsets can vary from one EHCI implementation to the next. Parameterise accordingly. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | xhci: allow address slot being called multiple timesGerd Hoffmann2012-11-011-2/+7
| | | | | | | | | | | | | | | | | | win8 guests do that for some reason ... Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | xhci: add port trace pointsGerd Hoffmann2012-11-011-1/+5
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | xhci: set pls in xhci_port_update & xhci_port_resetGerd Hoffmann2012-11-011-2/+24
| | | | | | | | | | | | | | | | | | | | | Set the port link state to the correct values in xhci_port_update and xhci_port_reset functions. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | xhci: add xhci_port_resetGerd Hoffmann2012-11-011-4/+9
| | | | | | | | | | | | | | | | | | Move port reset logic to its own function. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | xhci: add xhci_port_notifyGerd Hoffmann2012-11-011-14/+17
| | | | | | | | | | | | | | | | | | | | | Create a function to notify the guest about port status changes and put it into use. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | xhci: add xhci_port_have_deviceGerd Hoffmann2012-11-011-2/+12
| | | | | | | | | | | | | | | | | | | | | 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 <kraxel@redhat.com>
| * | xhci: s/xhci_update_port/xhci_port_update/Gerd Hoffmann2012-11-011-5/+5
| | | | | | | | | | | | | | | | | | | | | 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 <kraxel@redhat.com>
| * | xhci: add {get,set}_field macros & enum for plsGerd Hoffmann2012-11-011-8/+31
| |/ | | | | | | | | | | | | | | 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 <kraxel@redhat.com>
* | Merge remote-tracking branch 'kraxel/pixman.v3' into stagingAnthony Liguori2012-11-0122-104/+111
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kraxel/pixman.v3: (22 commits) pixman: drop obsolete fields from DisplaySurface pixman/vnc: remove dead code. pixman/vnc: remove rgb_prepare_row* functions pixman/vnc: use pixman images in vnc. pixman: switch screendump function. vga: stop direct access to DisplaySurface fields. qxl: stop direct access to DisplaySurface fields. console: don't set PixelFormat alpha fields for 32bpp console: make qemu_alloc_display static pixman: add pixman image to DisplaySurface pixman: helper functions pixman: windup in configure & makefiles pixman: add submodule console: remove DisplayAllocator console: remove dpy_gfx_fill vga: fix text mode updating console: init displaychangelisteners on register console: untangle gfx & txt updates console: s/TextConsole/QemuConsole/ console: move set_mouse + cursor_define callbacks ... Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * | pixman: switch screendump function.Gerd Hoffmann2012-11-011-28/+11
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | vga: stop direct access to DisplaySurface fields.Gerd Hoffmann2012-11-011-2/+7
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | qxl: stop direct access to DisplaySurface fields.Gerd Hoffmann2012-11-011-1/+1
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | vga: fix text mode updatingGerd Hoffmann2012-11-012-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With both text (curses) and graphics (vnc/sdl/spice/...) display active vga text mode emulation fails to update both correctly. Depending on whenever vga_update_text() or vga_draw_text() happens to be called first only the text display or only the graphics display will see display resolution changes and full redraws. Fix it by calling both text/gfx resize functions in both code paths and keep track of full screen redraws needed in VGACommonState fields. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
OpenPOWER on IntegriCloud