p2m: introduce misc type p2m_sys_rw for mmio rw mappings
RFC PATCH 2/5 p2m: introduce misc type p2m_sys_rw for mmio rw mappings
Introduce p2m type p2m_sys_rw as a preparation for the following patch. It used to provide correct flags for mapping special memory ranges that specified in dom0_iommu_rwmem command line. See comment in the following patch for detailed explanation.
Signed-off-by Elena Ufimtseva <[email protected]>
--- xen/arch/x86/mm/p2m-ept.c | 1 + xen/include/asm-x86/p2m.h | 2 ++ 2 files changed, 3 insertions(+)
xen/arch/x86/mm/p2m-ept.c +1 -0
@@ -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_sys_rw: entry->r = entry->w = entry->x =1 ;break ;case p2m_mmio_direct:
xen/include/asm-x86/p2m.h +2 -0
@@ -73,6 +73,7 @@ typedef enum { p2m_ram_broken =13 ,/* Broken page, access cause domain crash */ p2m_map_foreign =14 ,/* ram pages from foreign domain */ p2m_mmio_write_dm =15 ,/* Read-only; writes go to the device model */ + p2m_sys_rw =16 ,/* Read/write mapping of user specified RAM */ } p2m_type_t;/* Modifiers to the query */
@@ -718,6 +719,7 @@ static inline unsigned int p2m_get_iommu_flags(p2m_type_t p2mt)case p2m_grant_map_rw:case p2m_ram_logdirty:case p2m_map_foreign: +case p2m_sys_rw: flags = IOMMUF_readable | IOMMUF_writable;break ;case p2m_ram_ro:
Signature · 1 line
1.7.10.4