Bugs item #2443886, was opened at 2008-12-17 18:04
Message generated for change (Comment added) made by jiajun
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2443886&group_id=180599

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: kernel
Group: None
>Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Jiajun Xu (jiajun)
Assigned to: Avi Kivity (avik)
Summary: SMP PAE Vista guest crash with inject_page_fault

Initial Comment:
Kernel Commit:9ff66047142bd6a22825ada67eeaebbdf60c0280
Userspace Commit:8eae225cf8cd82316fcc78569aeb1adbbc077cb8
Host Kernel Version: 2.6.28-rc6

>From above commit, we can not boot up SMP PAE Vista guest, which always crash 
>and reboot when it is booting.

On host console, it shows "inject_page_fault" with address 0x842399d0.
##########
kvm: inject_page_fault: double fault 0x842399d0
kvm: inject_page_fault: double fault 0x842399d0
##########

The bug does not occur with UP PAE Vista and UP/SMP 32e Vista guest.

----------------------------------------------------------------------

>Comment By: Jiajun Xu (jiajun)
Date: 2008-12-22 01:28

Message:
Verfied with commit ec7808079ed4978009bcade9d21db99e2a193dcf, the bug is
fixed.

----------------------------------------------------------------------

Comment By: Avi Kivity (avik)
Date: 2008-12-21 08:42

Message:
Fixed by

commit ec7808079ed4978009bcade9d21db99e2a193dcf
Author: Avi Kivity <[email protected]>
Date:   Sun Dec 21 18:31:10 2008 +0200

    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 <[email protected]>

diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 641c078..d50ebac 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,
        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) {


----------------------------------------------------------------------

Comment By: Avi Kivity (avik)
Date: 2008-12-21 02:58

Message:
bisected to 

commit 6364a3918cb5c28376849e7fca3e09bd66b859f3
Author: Marcelo Tosatti <[email protected]>
Date:   Mon Dec 1 22:32:04 2008 -0200

    KVM: MMU: skip global pgtables on sync due to cr3 switch
    
    Skip syncing global pages on cr3 switch (but not on cr4/cr0). This is
    important for Linux 32-bit guests with PAE, where the kmap page is
    marked as global.
    
    Signed-off-by: Marcelo Tosatti <[email protected]>
    Signed-off-by: Avi Kivity <[email protected]>


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2443886&group_id=180599
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to