Skip to content

RFC pvh: dom0 special memory regions mapping

Elena Ufimtseva xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 20 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5iommu: need_iommu set earlyxen/arch/x86/domain_build.c+1 -03 replies
2/5p2m: introduce misc type p2m_sys_rw for mmio rw mappingsxen/arch/x86/mm/p2m-ept.c xen/include/asm-x86/p2m.h+3 -00 replies
3/5pvh: add rwmem_ranges to keep mapped special regionsxen/drivers/passthrough/x86/iommu.c xen/include/asm-x86/hvm/iommu.h xen/include/xen/iommu.h+8 -01 reply
4/5pvh: dom0 add rw mapping for dom0_iommu_rwmem boot optxen/arch/x86/mm/p2m-ept.c xen/arch/x86/mm/p2m.c xen/drivers/passthrough/iommu.c +2 more+67 -65 replies
5/5pvh: dom0 boot option to specify iommu rw rangesxen/arch/x86/domain_build.c+49 -09 replies

Reviews trailers per patch

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

PatchAndrew Cooper
1/5R-b
2/5
3/5
4/5
5/5

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

Read the v1 thread

Cover letter [PATCH RFC 0/5] pvh: dom0 special memory regions mapping

This patch set introduces xen boot option dom0_iommu_rwmem for special memory regions that are not reported by ACPI as RMRRs and are reserved in e820 map but require iommu mapping RW permissions (per experiment, only R). The problem was discovered in few systems. See discussion:
http://lists.xenproject.org/archives/html/xen-devel/2015-01/msg02513.html

The patch set fixes the problem booting dom0 in pvh mode on some machines. It introduces p2m_sys_rw memory type for these special regions and maps with RW permissions with vtd iommu. The rmrrs regions are kept in list rwmem_ranges in hvm_arch structure where rmmrs are also reside. This may not be plausible solution and comments and suggestions are welcome.

The patch set is split in 5 patches:

- iommu: need_iommu set early

	sets need_iommu early so dom0 pvh specific functions can take this
	into account and perform proper iommu mapping;
- p2m: introduce misc type p2m_sys_rw for mmio rw mappings
	p2m_sys_rw type introduces to provide correct mapping permissions and
	distinguish from other types;
- pvh: add rwmem_ranges to keep mapped special regions
	to keep special regions in arch_hvm_iommu.
- pvh: dom0 add rw mapping for dom0_iommu_rwmem boot opt
	sets correct permissions for ept entry corresponding to specified
	region;
- pvh: dom0 boot option to specify iommu rw ranges
	defines boot option and parses it into the list of of rwmem_ranges;

Your comments and suggestions are welcome as there is a room for improvement and desire to be in sync with other design proposals as rmmrs design.

Elena Ufimtseva (5):
iommu: need_iommu set early
p2m: introduce misc type p2m_sys_rw for mmio rw mappings
pvh: add rwmem_ranges to keep mapped special regions
pvh: dom0 add rw mapping for dom0_iommu_rwmem boot opt
pvh: dom0 boot option to specify iommu rw ranges

 xen/arch/x86/domain_build.c         |   50 +++++++++++++++++++++++++++++++
 xen/arch/x86/mm/p2m-ept.c           |    7 +++--
 xen/arch/x86/mm/p2m.c               |    2 +-
 xen/drivers/passthrough/iommu.c     |   55 ++++++++++++++++++++++++++++++++++-
 xen/drivers/passthrough/vtd/iommu.c |    7 +++++
 xen/drivers/passthrough/x86/iommu.c |    1 +
 xen/include/asm-x86/hvm/iommu.h     |    2 ++
 xen/include/asm-x86/p2m.h           |    5 +++-
 xen/include/xen/iommu.h             |    5 ++++
 9 files changed, 128 insertions(+), 6 deletions(-)
Signature · 1 line
1.7.10.4