diff options
author | Avi Kivity <avi@qumranet.com> | 2007-11-21 13:54:47 +0200 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 17:53:10 +0200 |
commit | da928521b7a095e85f6ac92a6c106bca7e17625f (patch) | |
tree | 4c8fc2b3f056cd1bd7d335958bf384ebc62d8614 /drivers/kvm/paging_tmpl.h | |
parent | 5fb07ddb183eb4728f240e09c3305d271ce61d48 (diff) |
KVM: MMU: Move pse36 handling to the guest walker
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/paging_tmpl.h')
-rw-r--r-- | drivers/kvm/paging_tmpl.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h index 6f79ae87d0c..dceb4b9137a 100644 --- a/drivers/kvm/paging_tmpl.h +++ b/drivers/kvm/paging_tmpl.h @@ -149,6 +149,8 @@ static int FNAME(walk_addr)(struct guest_walker *walker, && (PTTYPE == 64 || is_pse(vcpu))) { walker->gfn = gpte_to_gfn_pde(pte); walker->gfn += PT_INDEX(addr, PT_PAGE_TABLE_LEVEL); + if (PTTYPE == 32 && is_cpuid_PSE36()) + walker->gfn += pse36_gfn_delta(pte); break; } @@ -320,9 +322,6 @@ static void FNAME(set_pde)(struct kvm_vcpu *vcpu, pt_element_t gpde, access_bits &= gpde; gaddr = (gpa_t)gfn << PAGE_SHIFT; - if (PTTYPE == 32 && is_cpuid_PSE36()) - gaddr |= (gpde & PT32_DIR_PSE36_MASK) << - (32 - PT32_DIR_PSE36_SHIFT); FNAME(set_pte_common)(vcpu, shadow_pte, gaddr, gpde, access_bits, user_fault, write_fault, ptwrite, walker, gfn); |