[RFC PATCH 5/5] iommu/virtio-iommu: Support attaching VT-d IO pgtable

2023-11-05 Thread Tina Zhang
Add VT-d IO page table support to ATTACH_TABLE request. Signed-off-by: Tina Zhang --- drivers/iommu/virtio-iommu.c | 23 +++ include/uapi/linux/virtio_iommu.h | 26 ++ 2 files changed, 49 insertions(+) diff --git a/drivers/iommu/virtio-iommu.c b

[RFC PATCH 4/5] iommu/vt-d: Adapt alloc_pgtable interface to be used by others

2023-11-05 Thread Tina Zhang
The generic IO page table framework provides a set of interfaces for invoking IO page table operations. Other entity (e.g., virtio-iommu driver) can use the interface to ask VT-d driver to generate a VT-d format IO page table. This patch adds the support. Signed-off-by: Tina Zhang --- drivers

[RFC PATCH 3/5] iommu/io-pgtable: Introduce struct vtd_cfg

2023-11-05 Thread Tina Zhang
VT-d hardware cap/ecap information is needed for driver to generate VT-d format IO page table. Add struct vtd_cfg to keep the info. Signed-off-by: Tina Zhang --- include/linux/io-pgtable.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/io-pgtable.h b/include/linux/io

[RFC PATCH 1/5] iommu/virtio-iommu: Correct the values of granule and nr_pages

2023-11-05 Thread Tina Zhang
stment. Signed-off-by: Tina Zhang --- drivers/iommu/virtio-iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c index 08e310672e57..b1ceaac974e2 100644 --- a/drivers/iommu/virtio-iommu.c +++ b/drivers/iommu/virtio

[RFC PATCH 0/5] virtio-iommu: Add VT-d IO page table

2023-11-05 Thread Tina Zhang
/202310/msg00018.html [2]:https://jpbrucker.net/git/linux/log/?h=virtio-iommu/pgtables Tina Zhang (5): iommu/virtio-iommu: Correct the values of granule and nr_pages iommu/vt-d: Add generic IO page table support iommu/io-pgtable: Introduce struct vtd_cfg iommu/vt-d: Adapt alloc_pgtable

[RFC PATCH 2/5] iommu/vt-d: Add generic IO page table support

2023-11-05 Thread Tina Zhang
Add basic hook up code to implement generic IO page table framework. Signed-off-by: Tina Zhang --- drivers/iommu/intel/Kconfig | 1 + drivers/iommu/intel/iommu.c | 94 + drivers/iommu/intel/iommu.h | 7 +++ drivers/iommu/io-pgtable.c | 3 ++ include/linux