qemu/hw/usb
David Gibson 155de06f24 usb: Fix (another) bug in usb_packet_map() for IOMMU handling
Elements in qemu SGLists can cross IOMMU page boundaries.  So, in commit
39c138c842 "usb: Fix usb_packet_map() in the
presence of IOMMUs", I changed usb_packet_map() to split up each SGList
element on IOMMU page boundaries and each resulting piece of qemu's memory
space separately to the iovec the usb code uses internally.

That was correct in concept, but the patch has a bug.  The 'base' variable
correctly steps through the dma address of each piece, but then we call
the dma_memory_map() function on the base address of the whole SGList
element every time.

This patch fixes at least one problem using XHCI on the pseries guest
machine.  It didn't affect OHCI because that doesn't use usb_packet_map().
In theory it also affects EHCI, but we haven't observed that in practice.
I think the transfers were small enough on EHCI that they never crossed an
IOMMU page boundary in practice.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-16 11:27:05 +01:00
..
bus.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
combined-packet.c usb/combined-packet: Move freeing of combined to usb_combined_packet_remove() 2012-11-08 18:41:47 +01:00
core.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
desc.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
desc.h usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
dev-audio.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
dev-bluetooth.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
dev-hid.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
dev-hub.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
dev-network.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
dev-serial.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
dev-smartcard-reader.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
dev-storage.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
dev-uas.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
dev-wacom.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
hcd-ehci-pci.c ehci: fix migration 2012-11-09 09:09:34 +01:00
hcd-ehci-sysbus.c usb/ehci: add sysbus variant 2012-11-01 13:10:10 +01:00
hcd-ehci.c ehci: Add support for packets with both data and an error status 2012-11-08 18:41:47 +01:00
hcd-ehci.h ehci: Add support for packets with both data and an error status 2012-11-08 18:41:47 +01:00
hcd-musb.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
hcd-ohci.c Merge remote-tracking branch 'bonzini/scsi-next' into staging 2012-11-14 08:50:45 -06:00
hcd-uhci.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
hcd-xhci.c xhci: Fix some DMA host endian bugs 2012-11-09 08:27:55 +01:00
host-bsd.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
host-linux.c usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
host-stub.c
libhw.c usb: Fix (another) bug in usb_packet_map() for IOMMU handling 2012-11-16 11:27:05 +01:00
Makefile.objs usb: Add packet combining functions 2012-11-01 15:17:58 +01:00
redirect.c usb-redir: Allow packets to have both data and an error-status 2012-11-08 18:41:46 +01:00