[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH RFC 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 <elena.ufimtseva@xxxxxxxxxx>
---
 xen/arch/x86/mm/p2m-ept.c |    1 +
 xen/include/asm-x86/p2m.h |    2 ++
 2 files changed, 3 insertions(+)

diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index c2d7720..d7d8ad1 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_sys_rw:
             entry->r = entry->w = entry->x = 1;
             break;
         case p2m_mmio_direct:
diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h
index e93c551..a95521d 100644
--- a/xen/include/asm-x86/p2m.h
+++ b/xen/include/asm-x86/p2m.h
@@ -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:
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.