ia64/xen-unstable

changeset 12517:b0a58923fab5

[XEN] Update shadow audit code.
Make the flag checks line up with the current flag propagation strategy.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Mon Nov 20 15:30:52 2006 +0000 (2006-11-20)
parents 8ff3287f4169
children ea457d9d3fb2
files xen/arch/x86/mm/shadow/multi.c
line diff
     1.1 --- a/xen/arch/x86/mm/shadow/multi.c	Mon Nov 20 12:05:25 2006 +0000
     1.2 +++ b/xen/arch/x86/mm/shadow/multi.c	Mon Nov 20 15:30:52 2006 +0000
     1.3 @@ -3941,22 +3941,22 @@ static char * sh_audit_flags(struct vcpu
     1.4          return "shadow is present but guest is not present";
     1.5      if ( (sflags & _PAGE_GLOBAL) && !is_hvm_vcpu(v) ) 
     1.6          return "global bit set in PV shadow";
     1.7 -    if ( (level == 1 || (level == 2 && (gflags & _PAGE_PSE)))
     1.8 -         && ((sflags & _PAGE_DIRTY) && !(gflags & _PAGE_DIRTY)) ) 
     1.9 -        return "dirty bit not propagated";
    1.10      if ( level == 2 && (sflags & _PAGE_PSE) )
    1.11          return "PS bit set in shadow";
    1.12  #if SHADOW_PAGING_LEVELS == 3
    1.13      if ( level == 3 ) return NULL; /* All the other bits are blank in PAEl3 */
    1.14  #endif
    1.15 +    if ( (sflags & _PAGE_PRESENT) && !(gflags & _PAGE_ACCESSED) ) 
    1.16 +        return "accessed bit not propagated";
    1.17 +    if ( (level == 1 || (level == 2 && (gflags & _PAGE_PSE)))
    1.18 +         && ((sflags & _PAGE_RW) && !(gflags & _PAGE_DIRTY)) ) 
    1.19 +        return "dirty bit not propagated";
    1.20      if ( (sflags & _PAGE_USER) != (gflags & _PAGE_USER) ) 
    1.21          return "user/supervisor bit does not match";
    1.22      if ( (sflags & _PAGE_NX_BIT) != (gflags & _PAGE_NX_BIT) ) 
    1.23          return "NX bit does not match";
    1.24      if ( (sflags & _PAGE_RW) && !(gflags & _PAGE_RW) ) 
    1.25          return "shadow grants write access but guest does not";
    1.26 -    if ( (sflags & _PAGE_ACCESSED) && !(gflags & _PAGE_ACCESSED) ) 
    1.27 -        return "accessed bit not propagated";
    1.28      return NULL;
    1.29  }
    1.30