diff options
author | Avi Kivity <avi@redhat.com> | 2008-12-21 11:31:10 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 09:55:48 -0500 |
commit | 25e2343246fe135fce672f41abe61e9d2c38caac (patch) | |
tree | 76699895f67a24cbcdc05415068905d7e5be84c4 /arch/x86/kvm | |
parent | fe634fd46ff643d98fdbcd153847e08c3c076e6e (diff) |
KVM: MMU: Don't treat a global pte as such if cr4.pge is cleared
The pte.g bit is meaningless if global pages are disabled; deferring
mmu page synchronization on these ptes will lead to the guest using stale
shadow ptes.
Fixes Vista x86 smp bootloader failure.
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/mmu.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 641c07844e6e..d50ebac6a07f 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -1669,6 +1669,8 @@ static int set_spte(struct kvm_vcpu *vcpu, u64 *shadow_pte, | |||
1669 | u64 mt_mask = shadow_mt_mask; | 1669 | u64 mt_mask = shadow_mt_mask; |
1670 | struct kvm_mmu_page *sp = page_header(__pa(shadow_pte)); | 1670 | struct kvm_mmu_page *sp = page_header(__pa(shadow_pte)); |
1671 | 1671 | ||
1672 | if (!(vcpu->arch.cr4 & X86_CR4_PGE)) | ||
1673 | global = 0; | ||
1672 | if (!global && sp->global) { | 1674 | if (!global && sp->global) { |
1673 | sp->global = 0; | 1675 | sp->global = 0; |
1674 | if (sp->unsync) { | 1676 | if (sp->unsync) { |