mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
Small fixes to changesets 10424 and 10425 (spurious #PF detection).
Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
1 parent
1d13b43fea
commit
9c8f5290ef
2 files changed
+5
-5
No files matched your search
@@ -324,7 +324,7 @@ static int spurious_fault(struct pt_regs *regs,
|
||||
#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);
|
||||
|
||||
@@ -592,6 +592,10 @@ static int __spurious_page_fault(
|
||||
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;
|
||||
@@ -654,10 +658,6 @@ static int spurious_page_fault(
|
||||
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);
|
||||
|
||||