All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH V2 00/26] xen/vIOMMU: Add vIOMMU support with irq remapping fucntion of virtual vtd
@ 2017-05-18  5:34 Lan Tianyu
  2017-05-18  5:34 ` [RFC PATCH V2 1/26] VIOMMU: Add vIOMMU helper functions to create, destroy and query capabilities Lan Tianyu
                   ` (25 more replies)
  0 siblings, 26 replies; 42+ messages in thread
From: Lan Tianyu @ 2017-05-18  5:34 UTC (permalink / raw)
  To: xen-devel
  Cc: Lan Tianyu, kevin.tian, wei.liu2, andrew.cooper3, ian.jackson,
	jbeulich, chao.gao


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@lists.xen.org
https://lists.xen.org/xen-devel

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

end of thread, other threads:[~2017-06-06 16:38 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-18  5:34 [RFC PATCH V2 00/26] xen/vIOMMU: Add vIOMMU support with irq remapping fucntion of virtual vtd Lan Tianyu
2017-05-18  5:34 ` [RFC PATCH V2 1/26] VIOMMU: Add vIOMMU helper functions to create, destroy and query capabilities Lan Tianyu
2017-05-30 15:36   ` Wei Liu
2017-05-30 15:42     ` Jan Beulich
2017-06-02  7:10       ` Lan Tianyu
2017-06-02  7:31         ` Julien Grall
2017-06-06  6:31           ` Jan Beulich
2017-06-06 16:38             ` Julien Grall
2017-05-18  5:34 ` [RFC PATCH V2 2/26] DOMCTL: Introduce new DOMCTL commands for vIOMMU support Lan Tianyu
2017-05-30 15:36   ` Wei Liu
2017-05-18  5:34 ` [RFC PATCH V2 3/26] VIOMMU: Add irq request callback to deal with irq remapping Lan Tianyu
2017-05-30 15:36   ` Wei Liu
2017-05-18  5:34 ` [RFC PATCH V2 4/26] VIOMMU: Add get irq info callback to convert irq remapping request Lan Tianyu
2017-05-30 15:36   ` Wei Liu
2017-05-18  5:34 ` [RFC PATCH V2 5/26] Xen/doc: Add Xen virtual IOMMU doc Lan Tianyu
2017-05-18  5:34 ` [RFC PATCH V2 6/26] Tools/libxc: Add viommu operations in libxc Lan Tianyu
2017-05-30 15:36   ` Wei Liu
2017-05-18  5:34 ` [RFC PATCH V2 7/26] Tools/libacpi: Add DMA remapping reporting (DMAR) ACPI table structures Lan Tianyu
2017-05-18  5:34 ` [RFC PATCH V2 8/26] Tools/libacpi: Add new fields in acpi_config to build DMAR table Lan Tianyu
2017-05-18  5:34 ` [RFC PATCH V2 9/26] Tools/libacpi: Add a user configurable parameter to control vIOMMU attributes Lan Tianyu
2017-05-18  5:34 ` [RFC PATCH V2 10/26] libxl: create vIOMMU during domain construction Lan Tianyu
2017-05-30 15:36   ` Wei Liu
2017-05-18  5:34 ` [RFC PATCH V2 11/26] x86/hvm: Introduce a emulated VTD for HVM Lan Tianyu
2017-05-30 15:36   ` Wei Liu
2017-05-30 15:46     ` Jan Beulich
2017-05-18  5:34 ` [RFC PATCH V2 12/26] X86/vvtd: Add MMIO handler for VVTD Lan Tianyu
2017-05-30 15:36   ` Wei Liu
2017-05-18  5:34 ` [RFC PATCH V2 13/26] X86/vvtd: Set Interrupt Remapping Table Pointer through GCMD Lan Tianyu
2017-05-18  5:34 ` [RFC PATCH V2 14/26] X86/vvtd: Process interrupt remapping request Lan Tianyu
2017-05-18  5:34 ` [RFC PATCH V2 15/26] x86/vvtd: decode interrupt attribute from IRTE Lan Tianyu
2017-05-18  5:34 ` [RFC PATCH V2 16/26] x86/vioapic: Hook interrupt delivery of vIOAPIC Lan Tianyu
2017-05-18  5:34 ` [RFC PATCH V2 17/26] X86/vvtd: Enable Queued Invalidation through GCMD Lan Tianyu
2017-05-18  5:34 ` [RFC PATCH V2 18/26] X86/vvtd: Enable Interrupt Remapping " Lan Tianyu
2017-05-18  5:34 ` [RFC PATCH V2 19/26] x86/vpt: Get interrupt vector through a vioapic interface Lan Tianyu
2017-05-18  5:34 ` [RFC PATCH V2 20/26] passthrough: move some fields of hvm_gmsi_info to a sub-structure Lan Tianyu
2017-05-18  5:34 ` [RFC PATCH V2 21/26] Tools/libxc: Add a new interface to bind remapping format msi with pirq Lan Tianyu
2017-05-30 15:36   ` Wei Liu
2017-05-18  5:34 ` [RFC PATCH V2 22/26] x86/vmsi: Hook delivering remapping format msi to guest Lan Tianyu
2017-05-18  5:34 ` [RFC PATCH V2 23/26] x86/vvtd: Handle interrupt translation faults Lan Tianyu
2017-05-18  5:34 ` [RFC PATCH V2 24/26] x86/vvtd: Add queued invalidation (QI) support Lan Tianyu
2017-05-18  5:34 ` [RFC PATCH V2 25/26] x86/vlapic: drop no longer suitable restriction to set x2apic id Lan Tianyu
2017-05-18  5:34 ` [RFC PATCH V2 26/26] x86/vvtd: save and restore emulated VT-d Lan Tianyu

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.