[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH V2 00/25] xen/vIOMMU: Add vIOMMU support with irq remapping fucntion of virtual vtd
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_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 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 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/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: Add queued invalidation (QI) support x86/vvtd: save and restore emulated VT-d Lan Tianyu (4): 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 | 139 ++++ tools/libacpi/acpi2_0.h | 61 ++ tools/libacpi/build.c | 57 ++ tools/libacpi/libacpi.h | 9 + tools/libxc/Makefile | 1 + tools/libxc/include/xenctrl.h | 25 + tools/libxc/xc_domain.c | 53 ++ tools/libxc/xc_viommu.c | 81 +++ tools/libxl/libxl_arch.h | 5 + tools/libxl/libxl_dom.c | 36 + tools/libxl/libxl_types.idl | 16 + tools/libxl/libxl_x86.c | 28 + tools/libxl/libxl_x86_acpi.c | 48 ++ tools/xl/xl_parse.c | 66 ++ xen/arch/x86/hvm/irq.c | 11 + xen/arch/x86/hvm/vioapic.c | 32 +- xen/arch/x86/hvm/vmsi.c | 18 +- xen/common/domctl.c | 3 + xen/common/viommu.c | 74 ++ xen/drivers/passthrough/io.c | 190 ++++- xen/drivers/passthrough/vtd/Makefile | 7 +- xen/drivers/passthrough/vtd/iommu.h | 222 +++++- xen/drivers/passthrough/vtd/vtd.h | 6 + xen/drivers/passthrough/vtd/vvtd.c | 1198 ++++++++++++++++++++++++++++++++ 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 | 59 ++ xen/include/xen/hvm/irq.h | 15 +- xen/include/xen/viommu.h | 24 + 31 files changed, 2546 insertions(+), 83 deletions(-) create mode 100644 docs/misc/viommu.txt create mode 100644 tools/libxc/xc_viommu.c create mode 100644 xen/drivers/passthrough/vtd/vvtd.c create mode 100644 xen/include/asm-x86/viommu.h -- 1.8.3.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |