[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 07/11] x86/altp2m: introduce p2m_ram_rw_ve type.
This is treated exactly like p2m_ram_rw, except that suppress_ve is not set in the EPTE. Signed-off-by: Ed White <edmund.h.white@xxxxxxxxx> --- xen/arch/x86/mm/p2m-ept.c | 3 ++- xen/include/asm-x86/p2m.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c index 255b681..d227cbb 100644 --- a/xen/arch/x86/mm/p2m-ept.c +++ b/xen/arch/x86/mm/p2m-ept.c @@ -117,6 +117,7 @@ static void ept_p2m_type_to_flags(ept_entry_t *entry, p2m_type_t type, p2m_acces entry->r = entry->w = entry->x = 0; break; case p2m_ram_rw: + case p2m_ram_rw_ve: entry->r = entry->w = entry->x = 1; break; case p2m_mmio_direct: @@ -771,7 +772,7 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn, } if ( cpu_has_vmx_virt_exceptions ) - new_entry.suppress_ve = 1; + new_entry.suppress_ve = (p2mt != p2m_ram_rw_ve); rc = atomic_write_ept_entry(ept_entry, new_entry, target); if ( unlikely(rc) ) diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h index 9fb5ba0..68a5f80 100644 --- a/xen/include/asm-x86/p2m.h +++ b/xen/include/asm-x86/p2m.h @@ -72,6 +72,7 @@ typedef enum { p2m_ram_shared = 12, /* Shared or sharable memory */ p2m_ram_broken = 13, /* Broken page, access cause domain crash */ p2m_map_foreign = 14, /* ram pages from foreign domain */ + p2m_ram_rw_ve = 15, /* Same as p2m_ram_rw, but used to allow #VE */ } p2m_type_t; /* Modifiers to the query */ @@ -84,6 +85,7 @@ typedef unsigned int p2m_query_t; /* RAM types, which map to real machine frames */ #define P2M_RAM_TYPES (p2m_to_mask(p2m_ram_rw) \ + | p2m_to_mask(p2m_ram_rw_ve) \ | p2m_to_mask(p2m_ram_logdirty) \ | p2m_to_mask(p2m_ram_ro) \ | p2m_to_mask(p2m_ram_paging_out) \ -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |