diff options
author | Avi Kivity <avi@qumranet.com> | 2007-11-21 06:54:47 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 10:53:10 -0500 |
commit | da928521b7a095e85f6ac92a6c106bca7e17625f (patch) | |
tree | 4c8fc2b3f056cd1bd7d335958bf384ebc62d8614 /drivers/kvm/mmu.c | |
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/mmu.c')
-rw-r--r-- | drivers/kvm/mmu.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index 346aa65a08d5..a9fed594ac58 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c | |||
@@ -218,6 +218,13 @@ static int is_rmap_pte(u64 pte) | |||
218 | && pte != shadow_notrap_nonpresent_pte; | 218 | && pte != shadow_notrap_nonpresent_pte; |
219 | } | 219 | } |
220 | 220 | ||
221 | static gfn_t pse36_gfn_delta(u32 gpte) | ||
222 | { | ||
223 | int shift = 32 - PT32_DIR_PSE36_SHIFT - PAGE_SHIFT; | ||
224 | |||
225 | return (gpte & PT32_DIR_PSE36_MASK) << shift; | ||
226 | } | ||
227 | |||
221 | static void set_shadow_pte(u64 *sptep, u64 spte) | 228 | static void set_shadow_pte(u64 *sptep, u64 spte) |
222 | { | 229 | { |
223 | #ifdef CONFIG_X86_64 | 230 | #ifdef CONFIG_X86_64 |