[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH RFC 3/5] pvh: add rwmem_ranges to keep mapped special regions
Patch adds rwmem_ranges in arch_hvm_iommu to keep specail regions specified by dom0_iommu_rwmem boot option. These special regions mapped with p2m_sys_rw type introduced in the previous patch. TODO: - specify mapped flag in rwmem_range struct to indicte that actual mapping was successful; Signed-off-by: Elena Ufimtseva <elena.ufimtseva@xxxxxxxxxx> --- xen/drivers/passthrough/x86/iommu.c | 1 + xen/include/asm-x86/hvm/iommu.h | 2 ++ xen/include/xen/iommu.h | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/xen/drivers/passthrough/x86/iommu.c b/xen/drivers/passthrough/x86/iommu.c index 52d8948..2e266a7 100644 --- a/xen/drivers/passthrough/x86/iommu.c +++ b/xen/drivers/passthrough/x86/iommu.c @@ -118,6 +118,7 @@ int arch_iommu_domain_init(struct domain *d) spin_lock_init(&hd->arch.mapping_lock); INIT_LIST_HEAD(&hd->arch.g2m_ioport_list); INIT_LIST_HEAD(&hd->arch.mapped_rmrrs); + INIT_LIST_HEAD(&hd->arch.rwmem_ranges); return 0; } diff --git a/xen/include/asm-x86/hvm/iommu.h b/xen/include/asm-x86/hvm/iommu.h index 46cb126..3261b5c 100644 --- a/xen/include/asm-x86/hvm/iommu.h +++ b/xen/include/asm-x86/hvm/iommu.h @@ -2,6 +2,7 @@ #define __ASM_X86_HVM_IOMMU_H__ #include <xen/errno.h> +#include <xen/iommu.h> struct iommu_ops; extern const struct iommu_ops intel_iommu_ops; @@ -54,6 +55,7 @@ struct arch_hvm_iommu struct list_head g2m_ioport_list; /* guest to machine ioport mapping */ u64 iommu_bitmap; /* bitmap of iommu(s) that the domain uses */ struct list_head mapped_rmrrs; + struct list_head rwmem_ranges; /* amd iommu support */ int paging_mode; diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h index 8eb764a..a5762e0 100644 --- a/xen/include/xen/iommu.h +++ b/xen/include/xen/iommu.h @@ -191,4 +191,9 @@ DECLARE_PER_CPU(bool_t, iommu_dont_flush_iotlb); extern struct spinlock iommu_pt_cleanup_lock; extern struct page_list_head iommu_pt_cleanup_list; +struct rwmem_range { + struct list_head list; + u64 start, end; +}; + #endif /* _IOMMU_H_ */ -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |