[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [RFC PATCH V2 00/26] xen/vIOMMU: Add vIOMMU support with irq remapping fucntion of virtual vtd



Change since v1:
       1) Add Xen virtual IOMMU doc docs/misc/viommu.txt
       2) Move vIOMMU hypercall of create/destroy vIOMMU and query  
capabilities from dmop to domctl suggested by Paul Durrant. Because
these hypercalls can be done in tool stack and more VM mode(E,G PVH
or other modes don't use Qemu) can be benefit.
       3) Add check of input MMIO address and length.
       4) Add iommu_type in vIOMMU hypercall parameter to specify
vendor vIOMMU device model(E,G Intel VTD, AMD or ARM IOMMU. So far
only support Intel VTD).
       5) Add save and restore support for vvtd


This patchset is to introduce vIOMMU framework and add virtual VTD's
interrupt remapping support according "Xen virtual IOMMU high level
design doc V3"(https://lists.xenproject.org/archives/html/xen-devel/
2016-11/msg01391.html).

- vIOMMU framework
New framework provides viommu_ops and help functions to abstract
vIOMMU operations(E,G create, destroy, handle irq remapping request
and so on). Vendors(Intel, ARM, AMD and son) can implement their
vIOMMU callbacks.

- Virtual VTD
We enable irq remapping function and covers both
MSI and IOAPIC interrupts. Don't support post interrupt mode emulation
and post interrupt mode enabled on host with virtual VTD. Will add
later.

Repo:
https://github.com/lantianyu/Xen/commits/xen_viommu_rfc_v2https://github.com/lantianyu/Xen/commits/xen_viommu_rfc_v2

Chao Gao (21):
  Tools/libxc: Add viommu operations in libxc
  Tools/libacpi: Add DMA remapping reporting (DMAR) ACPI table
    structures
  Tools/libacpi: Add new fields in acpi_config to build DMAR table
  Tools/libacpi: Add a user configurable parameter to control vIOMMU
    attributes
  libxl: create vIOMMU during domain construction
  x86/hvm: Introduce a emulated VTD for HVM
  X86/vvtd: Add MMIO handler for VVTD
  X86/vvtd: Set Interrupt Remapping Table Pointer through GCMD
  X86/vvtd: Process interrupt remapping request
  x86/vvtd: decode interrupt attribute from IRTE
  x86/vioapic: Hook interrupt delivery of vIOAPIC
  X86/vvtd: Enable Queued Invalidation through GCMD
  X86/vvtd: Enable Interrupt Remapping through GCMD
  x86/vpt: Get interrupt vector through a vioapic interface
  passthrough: move some fields of hvm_gmsi_info to a sub-structure
  Tools/libxc: Add a new interface to bind remapping format msi with
    pirq
  x86/vmsi: Hook delivering remapping format msi to guest
  x86/vvtd: Handle interrupt translation faults
  x86/vvtd: Add queued invalidation (QI) support
  x86/vlapic: drop no longer suitable restriction to set x2apic id
  x86/vvtd: save and restore emulated VT-d

Lan Tianyu (5):
  VIOMMU: Add vIOMMU helper functions to create, destroy and query
    capabilities
  DOMCTL: Introduce new DOMCTL commands for vIOMMU support
  VIOMMU: Add irq request callback to deal with irq remapping
  VIOMMU: Add get irq info callback to convert irq remapping request
  Xen/doc: Add Xen virtual IOMMU doc

 docs/man/xl.cfg.pod.5.in               |   34 +-
 docs/misc/viommu.txt                   |  129 ++++
 tools/libacpi/acpi2_0.h                |   45 ++
 tools/libacpi/build.c                  |   58 ++
 tools/libacpi/libacpi.h                |   12 +
 tools/libxc/Makefile                   |    1 +
 tools/libxc/include/xenctrl.h          |   24 +
 tools/libxc/xc_domain.c                |   55 ++
 tools/libxc/xc_viommu.c                |   81 +++
 tools/libxl/libxl_arch.h               |    5 +
 tools/libxl/libxl_arm.c                |    7 +
 tools/libxl/libxl_create.c             |    4 +
 tools/libxl/libxl_dom.c                |   87 +++
 tools/libxl/libxl_types.idl            |   10 +
 tools/libxl/libxl_x86.c                |   24 +
 tools/xl/xl_parse.c                    |   64 ++
 xen/arch/x86/hvm/Makefile              |    1 +
 xen/arch/x86/hvm/irq.c                 |   11 +
 xen/arch/x86/hvm/vioapic.c             |   41 ++
 xen/arch/x86/hvm/vlapic.c              |   18 +-
 xen/arch/x86/hvm/vmsi.c                |   18 +-
 xen/arch/x86/hvm/vpt.c                 |    2 +-
 xen/arch/x86/hvm/vvtd.c                | 1223 ++++++++++++++++++++++++++++++++
 xen/arch/x86/setup.c                   |    1 +
 xen/common/Kconfig                     |   11 +
 xen/common/Makefile                    |    1 +
 xen/common/domain.c                    |    3 +
 xen/common/domctl.c                    |    3 +
 xen/common/viommu.c                    |  235 ++++++
 xen/drivers/passthrough/io.c           |  194 ++++-
 xen/drivers/passthrough/vtd/iommu.h    |  225 +++++-
 xen/drivers/passthrough/vtd/vtd.h      |    6 +
 xen/include/asm-x86/hvm/vioapic.h      |    1 +
 xen/include/asm-x86/msi.h              |    3 +
 xen/include/asm-x86/viommu.h           |   84 +++
 xen/include/public/arch-x86/hvm/save.h |   24 +-
 xen/include/public/domctl.h            |   47 ++
 xen/include/public/viommu.h            |   49 ++
 xen/include/xen/hvm/irq.h              |   15 +-
 xen/include/xen/sched.h                |    2 +
 xen/include/xen/viommu.h               |  103 +++
 41 files changed, 2864 insertions(+), 97 deletions(-)
 create mode 100644 docs/misc/viommu.txt
 create mode 100644 tools/libxc/xc_viommu.c
 create mode 100644 xen/arch/x86/hvm/vvtd.c
 create mode 100644 xen/common/viommu.c
 create mode 100644 xen/include/asm-x86/viommu.h
 create mode 100644 xen/include/public/viommu.h
 create mode 100644 xen/include/xen/viommu.h

-- 
1.8.3.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.