All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [V12 0/4] AMD IOMMU
@ 2016-06-15 12:21 David Kiarie
  2016-06-15 12:21 ` [Qemu-devel] [V12 1/4] hw/pci: Prepare for " David Kiarie
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: David Kiarie @ 2016-06-15 12:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: marcel, mst, peterx, alex.williamson, valentine.sinitsyn,
	jan.kiszka, ehabkost, David Kiarie

Hi all,

This patchset adds basic AMD IOMMU emulation support to Qemu.

Changes since V11
   -AMD IOMMU is not started with -device amd-iommu (with a dependency on Marcel's patches).
   -IOMMU commands are represented using bitfields which is less error prone and more readable[Peter]
   -Changed from debug fprintfs to tracing[Jan]

Changes since V10
 
   -Support for huge pages including some obscure AMD IOMMU feature that allows default page size override[Jan].
   -Fixed an issue with generation of interrupts. We noted that AMD IOMMU has BusMaster- and is therefore not able to generate interrupts like any other PCI device. We have resulted in writing directly to system address but this could be fixed by some patches which have not been merged yet.

Changes since v9

   -amd_iommu prefixes have been renamed to a shorter 'amdvi' both in the macros
    and in the functions/code. The register macros have not been moved to the 
    implementation file since almost the macros there are basically macros and I 
    reckoned renaming them should suffice.
   -taken care of byte order in the use of 'dma_memory_read'[Michael]
   -Taken care of invalid DTE entries to ensure no DMA unless a device is configured to allow it.
   -An issue with the emulate IOMMU defaulting to AMD_IOMMU has been fixed[Marcel]
   
You can test[1] this patches by starting with parameters 
    qemu-system-x86_64 -M -device amd-iommu -m 2G -enable-kvm -smp 4 -cpu host -hda file.img -soundhw ac97 
emulating whatever devices you want.

Not passing any command line parameters to linux should be enough to test this patches since the devices are basically
passes-through but to the 'host' (l1 guest). You can still go ahead pass command line parameter 'iommu=pt iommu=1'
and try to pass a device to L2 guest. This can also done without passing any iommu related parameters to the kernel. 

For convinience:
[1] https://github.com/aslaq/qemu/tree/v12

David Kiarie (4):
  hw/pci: Prepare for AMD IOMMU
  trace-events: Add AMD IOMMU trace events
  hw/i386: Introduce AMD IOMMU
  hw/i386: AMD IOMMU IVRS table

 hw/acpi/aml-build.c         |    2 +-
 hw/i386/Makefile.objs       |    1 +
 hw/i386/acpi-build.c        |   95 ++-
 hw/i386/amd_iommu.c         | 1559 +++++++++++++++++++++++++++++++++++++++++++
 hw/i386/amd_iommu.h         |  287 ++++++++
 include/hw/acpi/acpi-defs.h |   13 +
 include/hw/acpi/aml-build.h |    1 +
 include/hw/pci/pci.h        |    2 +
 trace-events                |   29 +
 9 files changed, 1977 insertions(+), 12 deletions(-)
 create mode 100644 hw/i386/amd_iommu.c
 create mode 100644 hw/i386/amd_iommu.h

-- 
2.1.4

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-07-08  9:52 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-15 12:21 [Qemu-devel] [V12 0/4] AMD IOMMU David Kiarie
2016-06-15 12:21 ` [Qemu-devel] [V12 1/4] hw/pci: Prepare for " David Kiarie
2016-06-22 19:53   ` Jan Kiszka
2016-06-15 12:21 ` [Qemu-devel] [V12 2/4] trace-events: Add AMD IOMMU trace events David Kiarie
2016-06-15 12:21 ` [Qemu-devel] [V12 3/4] hw/i386: Introduce AMD IOMMU David Kiarie
2016-06-22 20:24   ` Jan Kiszka
2016-07-04  5:06     ` David Kiarie
2016-07-04  5:41       ` Jan Kiszka
2016-07-04  5:49         ` David Kiarie
2016-07-04  5:57           ` Jan Kiszka
2016-07-08  7:01         ` David Kiarie
2016-07-08  9:51           ` Jan Kiszka
2016-06-15 13:15 ` [Qemu-devel] [V12 0/4] " Jan Kiszka
2016-06-15 14:26 ` Eduardo Habkost
2016-06-15 17:07   ` David Kiarie
2016-06-15 17:13     ` Jan Kiszka
     [not found] ` <1465993312-18119-5-git-send-email-davidkiarie4@gmail.com>
2016-06-22 20:25   ` [Qemu-devel] [V12 4/4] hw/i386: AMD IOMMU IVRS table Jan Kiszka
2016-07-04 20:33   ` Michael S. Tsirkin
2016-07-08  7:05     ` David Kiarie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.