]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: MMU: Don't treat a global pte as such if cr4.pge is cleared
authorAvi Kivity <avi@redhat.com>
Sun, 21 Dec 2008 16:31:10 +0000 (18:31 +0200)
committerAvi Kivity <avi@redhat.com>
Wed, 31 Dec 2008 14:55:48 +0000 (16:55 +0200)
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>
arch/x86/kvm/mmu.c

index 641c07844e6eb7ce8a03f81cc057b611082f72ef..d50ebac6a07faf174b7680365b859994c5996dff 100644 (file)
@@ -1669,6 +1669,8 @@ static int set_spte(struct kvm_vcpu *vcpu, u64 *shadow_pte,
        u64 mt_mask = shadow_mt_mask;
        struct kvm_mmu_page *sp = page_header(__pa(shadow_pte));
 
+       if (!(vcpu->arch.cr4 & X86_CR4_PGE))
+               global = 0;
        if (!global && sp->global) {
                sp->global = 0;
                if (sp->unsync) {