@@ -122,7 +122,6 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker,
{
pt_element_t pte;
pt_element_t __user *ptep_user;
- unsigned pt_access, uninitialized_var(pte_access);
bool eperm;
const int write_fault = access & PFERR_WRITE_MASK;
const int user_fault = access & PFERR_USER_MASK;
@@ -150,7 +149,7 @@ walk:
ASSERT((!is_long_mode(vcpu) && is_pae(vcpu)) ||
(mmu->get_cr3(vcpu) & CR3_NONPAE_RESERVED_BITS) == 0);
- pt_access = ACC_ALL;
+ walker->pt_access = ACC_ALL;
for (;;) {
gfn_t real_gfn;
@@ -224,7 +223,8 @@ walk:
pte |= PT_ACCESSED_MASK;
}
- pte_access = pt_access & FNAME(gpte_access)(vcpu, pte);
+ walker->pte_access = walker->pt_access &
+ FNAME(gpte_access)(vcpu, pte);
walker->ptes[walker->level - 1] = pte;
@@ -260,7 +260,7 @@ walk:
break;
}
- pt_access = pte_access;
+ walker->pt_access = walker->pte_access;
--walker->level;
}
@@ -286,10 +286,8 @@ walk:
walker->ptes[walker->level - 1] = pte;
}
- walker->pt_access = pt_access;
- walker->pte_access = pte_access;
pgprintk("%s: pte %llx pte_access %x pt_access %x\n",
- __func__, (u64)pte, pte_access, pt_access);
+ __func__, (u64)pte, walker->pte_access, walker->pt_access);
return 1;
error: