aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/mm/shadow/types.h
diff options
context:
space:
mode:
Diffstat (limited to 'xen/arch/x86/mm/shadow/types.h')
-rw-r--r--xen/arch/x86/mm/shadow/types.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/xen/arch/x86/mm/shadow/types.h b/xen/arch/x86/mm/shadow/types.h
index 8397e7ae2c..1595a25a5b 100644
--- a/xen/arch/x86/mm/shadow/types.h
+++ b/xen/arch/x86/mm/shadow/types.h
@@ -553,6 +553,9 @@ accumulate_guest_flags(struct vcpu *v, walk_t *gw)
{
u32 accumulated_flags;
+ if ( unlikely(!(guest_l1e_get_flags(gw->eff_l1e) & _PAGE_PRESENT)) )
+ return 0;
+
// We accumulate the permission flags with bitwise ANDing.
// This works for the PRESENT bit, RW bit, and USER bit.
// For the NX bit, however, the polarity is wrong, so we accumulate the