Skip to content

Lan Tianyu xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest29 patches 78 repliesIn review

Changes in v3 from the cover letter

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.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/29Xen/doc: Add Xen virtual IOMMU docdocs/misc/viommu.txt+136 -05 replies
2/29VIOMMU: Add vIOMMU helper functions to create, destroy vIOMMU instancedocs/misc/xen-command-line.markdown xen/arch/x86/Kconfig xen/common/Kconfig +5 more+231 -08 replies
3/29DOMCTL: Introduce new DOMCTL commands for vIOMMU supportxen/common/domctl.c xen/common/viommu.c xen/include/public/domctl.h +1 more+80 -02 replies
4/29tools/libacpi: Add DMA remapping reporting (DMAR) ACPI table structurestools/libacpi/acpi2_0.h+61 -02 replies
5/29tools/libacpi: Add new fields in acpi_config for DMAR tabletools/libacpi/build.c tools/libacpi/libacpi.h+65 -05 replies
6/29tools/libxl: Add a user configurable parameter to control vIOMMU attributesdocs/man/xl.cfg.pod.5.in tools/libxl/libxl_create.c tools/libxl/libxl_types.idl +1 more+142 -12 replies
7/29tools/libxl: build DMAR table for a guest with one virtual VTDtools/libxl/libxl_x86.c tools/libxl/libxl_x86_acpi.c+96 -52 replies
8/29tools/libxl: create vIOMMU during domain constructiontools/libxl/libxl_x86.c+17 -03 replies
9/29tools/libxc: Add viommu operations in libxctools/libxc/Makefile tools/libxc/include/xenctrl.h tools/libxc/xc_viommu.c+69 -01 reply
10/29vtd: add and align register definitionsxen/drivers/passthrough/vtd/iommu.h+31 -232 replies
11/29x86/hvm: Introduce a emulated VTD for HVMxen/drivers/passthrough/vtd/Makefile xen/drivers/passthrough/vtd/iommu.h xen/drivers/passthrough/vtd/vvtd.c+170 -75 replies
12/29x86/vvtd: Add MMIO handler for VVTDxen/drivers/passthrough/vtd/vvtd.c+91 -03 replies
13/29x86/vvtd: Set Interrupt Remapping Table Pointer through GCMDxen/drivers/passthrough/vtd/iommu.h xen/drivers/passthrough/vtd/vvtd.c+80 -13 replies
14/29x86/vvtd: Enable Interrupt Remapping through GCMDxen/drivers/passthrough/vtd/iommu.h xen/drivers/passthrough/vtd/vvtd.c+31 -21 reply
15/29x86/vvtd: Process interrupt remapping requestxen/drivers/passthrough/vtd/iommu.h xen/drivers/passthrough/vtd/vvtd.c+284 -14 replies
16/29x86/vvtd: decode interrupt attribute from IRTExen/drivers/passthrough/vtd/vvtd.c+22 -12 replies
17/29x86/vvtd: add a helper function to decide the interrupt formatxen/drivers/passthrough/vtd/vvtd.c+24 -11 reply
18/29VIOMMU: Add irq request callback to deal with irq remappingxen/common/viommu.c xen/include/asm-x86/viommu.h xen/include/xen/viommu.h+98 -01 reply
19/29x86/vioapic: Hook interrupt delivery of vIOAPICxen/arch/x86/hvm/vioapic.c+10 -01 reply
20/29VIOMMU: Add get irq info callback to convert irq remapping requestxen/common/viommu.c xen/include/asm-x86/viommu.h xen/include/xen/viommu.h+38 -04 replies
21/29VIOMMU: Introduce callback of checking irq remapping modexen/common/viommu.c xen/include/xen/viommu.h+25 -01 reply
22/29x86/vioapic: extend vioapic_get_vector() to support remapping format RTExen/arch/x86/hvm/vioapic.c+15 -13 replies
23/29passthrough: move some fields of hvm_gmsi_info to a sub-structurexen/arch/x86/hvm/vmsi.c xen/drivers/passthrough/io.c xen/include/asm-x86/hvm/irq.h+26 -200 replies
24/29tools/libxc: Add a new interface to bind remapping format msi with pirqtools/libxc/include/xenctrl.h tools/libxc/xc_domain.c xen/drivers/passthrough/io.c +2 more+216 -232 replies
25/29x86/vmsi: Hook delivering remapping format msi to guestxen/arch/x86/hvm/irq.c xen/arch/x86/hvm/vmsi.c xen/drivers/passthrough/io.c+30 -122 replies
26/29x86/vvtd: Handle interrupt translation faultsxen/drivers/passthrough/vtd/iommu.h xen/drivers/passthrough/vtd/vvtd.c+301 -114 replies
27/29x86/vvtd: Enable Queued Invalidation through GCMDxen/drivers/passthrough/vtd/iommu.h xen/drivers/passthrough/vtd/vvtd.c+19 -11 reply
28/29x86/vvtd: Add queued invalidation (QI) supportxen/drivers/passthrough/vtd/iommu.h xen/drivers/passthrough/vtd/vvtd.c+250 -15 replies
29/29x86/vvtd: save and restore emulated VT-dxen/drivers/passthrough/vtd/vvtd.c xen/include/public/arch-x86/hvm/save.h+76 -151 reply

Reviews trailers per patch

1 of 29 patches has a Reviewed-by or Acked-by.

PatchRoger Pau Monné
1/29
2/29
3/29
4/29
5/29
6/29
7/29
8/29
9/29
10/29R-b
11/29
12/29
13/29
14/29
15/29
16/29
17/29
18/29
19/29
20/29
21/29
22/29
23/29
24/29
25/29
26/29
27/29
28/29
29/29

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [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
Signature · 7 lines
1.8.3.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel