#endif
/* Reserved-bit violation or user access to kernel space? */
- if (error_code & PF_RSVD|PF_USER)
+ if (error_code & (PF_RSVD|PF_USER))
return 0;
pgd = init_mm.pgd + pgd_index(address);
l1_pgentry_t l1e, *l1t;
unsigned int required_flags, disallowed_flags;
+ /* Reserved bit violations are never spurious faults. */
+ if ( regs->error_code & PGERR_reserved_bit )
+ return 0;
+
required_flags = _PAGE_PRESENT;
if ( regs->error_code & PGERR_write_access )
required_flags |= _PAGE_RW;
struct domain *d = v->domain;
int is_spurious;
- /* Reserved bit violations are never spurious faults. */
- if ( regs->error_code & PGERR_reserved_bit )
- return 0;
-
LOCK_BIGLOCK(d);
is_spurious = __spurious_page_fault(addr, regs);