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

[Xen-devel] [PATCH V3 00/29]



Change since v2:
       1) Remove vIOMMU hypercall of query capabilities and introduce when 
necessary.
       2) Remove length field of vIOMMU create parameter of vIOMMU hypercall
       3) Introduce irq remapping mode callback to vIOMMU framework and vIOMMU 
device models
can check irq remapping mode by vendor specific ways.
       4) Update vIOMMU docs.
       5) Other changes please see patches' change logs.

Change since v1:
       1) Fix coding style issues
       2) Add definitions for vIOMMU type and capabilities
       3) Change vIOMMU kconfig and select vIOMMU default on x86
       4) Put vIOMMU creation in libxl__arch_domain_create()
       5) Make vIOMMU structure of tool stack more general for both PV and HVM.

Change since RFC v2:
       1) Move vvtd.c to drivers/passthrough/vtd directroy. 
       2) Make vIOMMU always built in on x86
       3) Add new boot cmd "viommu" to enable viommu function
       4) Fix some code stype issues.

Change since RFC 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/tree/xen_viommu_v3


Chao Gao (23):
  tools/libacpi: Add DMA remapping reporting (DMAR) ACPI table
    structures
  tools/libacpi: Add new fields in acpi_config for DMAR table
  tools/libxl: Add a user configurable parameter to control vIOMMU
    attributes
  tools/libxl: build DMAR table for a guest with one virtual VTD
  tools/libxl: create vIOMMU during domain construction
  tools/libxc: Add viommu operations in libxc
  vtd: add and align register definitions
  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: Enable Interrupt Remapping through GCMD
  x86/vvtd: Process interrupt remapping request
  x86/vvtd: decode interrupt attribute from IRTE
  x86/vvtd: add a helper function to decide the interrupt format
  x86/vioapic: Hook interrupt delivery of vIOAPIC
  x86/vioapic: extend vioapic_get_vector() to support remapping format
    RTE
  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: Enable Queued Invalidation through GCMD
  x86/vvtd: Add queued invalidation (QI) support
  x86/vvtd: save and restore emulated VT-d

Lan Tianyu (6):
  Xen/doc: Add Xen virtual IOMMU doc
  VIOMMU: Add vIOMMU helper functions to create, destroy vIOMMU instance
  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
  VIOMMU: Introduce callback of checking irq remapping mode

 docs/man/xl.cfg.pod.5.in               |   27 +
 docs/misc/viommu.txt                   |  136 ++++
 docs/misc/xen-command-line.markdown    |    7 +
 tools/libacpi/acpi2_0.h                |   61 ++
 tools/libacpi/build.c                  |   53 ++
 tools/libacpi/libacpi.h                |   12 +
 tools/libxc/Makefile                   |    1 +
 tools/libxc/include/xenctrl.h          |   21 +
 tools/libxc/xc_domain.c                |   53 ++
 tools/libxc/xc_viommu.c                |   64 ++
 tools/libxl/libxl_create.c             |   52 ++
 tools/libxl/libxl_types.idl            |   12 +
 tools/libxl/libxl_x86.c                |   20 +-
 tools/libxl/libxl_x86_acpi.c           |   98 ++-
 tools/xl/xl_parse.c                    |   52 +-
 xen/arch/x86/Kconfig                   |    1 +
 xen/arch/x86/hvm/irq.c                 |    7 +
 xen/arch/x86/hvm/vioapic.c             |   26 +-
 xen/arch/x86/hvm/vmsi.c                |   18 +-
 xen/common/Kconfig                     |    3 +
 xen/common/Makefile                    |    1 +
 xen/common/domain.c                    |    4 +
 xen/common/domctl.c                    |    6 +
 xen/common/viommu.c                    |  220 ++++++
 xen/drivers/passthrough/io.c           |  178 ++++-
 xen/drivers/passthrough/vtd/Makefile   |    7 +-
 xen/drivers/passthrough/vtd/iommu.h    |  193 ++++--
 xen/drivers/passthrough/vtd/vvtd.c     | 1178 ++++++++++++++++++++++++++++++++
 xen/include/asm-x86/hvm/irq.h          |   15 +-
 xen/include/asm-x86/viommu.h           |   80 +++
 xen/include/public/arch-x86/hvm/save.h |   25 +-
 xen/include/public/domctl.h            |   49 ++
 xen/include/xen/sched.h                |    8 +
 xen/include/xen/viommu.h               |  100 +++
 34 files changed, 2698 insertions(+), 90 deletions(-)
 create mode 100644 docs/misc/viommu.txt
 create mode 100644 tools/libxc/xc_viommu.c
 create mode 100644 xen/common/viommu.c
 create mode 100644 xen/drivers/passthrough/vtd/vvtd.c
 create mode 100644 xen/include/asm-x86/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®.