Skip to contentSkip to conversation

x86/shadow: add a clarifying assertion

PATCH New Jan Beulich 1 participant 1 message Mar 6, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/shadow: add a clarifying assertion

... documenting that we don't have to worry about merging guest provided flags with the ones we want to enforce ourselves.

xen/arch/x86/mm/shadow/multi.c +2 -0
@@ -592,6 +592,8 @@ _sh_propagate(struct vcpu *v, 
     {
         unsigned int type;
 
+        ASSERT(!(sflags & (_PAGE_PAT | _PAGE_PCD | _PAGE_PWT)));
+
         /* compute the PAT index for shadow page entry when VT-d is enabled
          * and device assigned. 
          * 1) direct MMIO: compute the PAT index with gMTRR=UC and gPAT.

x86/shadow: add a clarifying assertion

... documenting that we don't have to worry about merging guest provided flags with the ones we want to enforce ourselves.

xen/arch/x86/mm/shadow/multi.c +2 -0
@@ -592,6 +592,8 @@ _sh_propagate(struct vcpu *v, 
     {
         unsigned int type;
 
+        ASSERT(!(sflags & (_PAGE_PAT | _PAGE_PCD | _PAGE_PWT)));
+
         /* compute the PAT index for shadow page entry when VT-d is enabled
          * and device assigned. 
          * 1) direct MMIO: compute the PAT index with gMTRR=UC and gPAT.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel