Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4c981b43d7ec18818754bf85b829865abd0ce340
Commit:     4c981b43d7ec18818754bf85b829865abd0ce340
Parent:     7cfa4b0a43286b1da3afa4f5f99d52e65a8f30fc
Author:     Avi Kivity <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 25 09:22:12 2007 +0300
Committer:  Avi Kivity <[EMAIL PROTECTED]>
CommitDate: Wed Jul 25 14:31:13 2007 +0300

    KVM: Fix removal of nx capability from guest cpuid
    
    Testing the wrong bit caused kvm not to disable nx on the guest when it is
    disabled on the host (an mmu optimization relies on the nx bits being the
    same in the guest and host).
    
    This allows Windows to boot when nx is disabled on te host (e.g. when
    host pae is disabled).
    
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
---
 drivers/kvm/kvm_main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index a8d8db8..9685609 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -2432,9 +2432,9 @@ static void cpuid_fix_nx_cap(struct kvm_vcpu *vcpu)
                        break;
                }
        }
-       if (entry && (entry->edx & EFER_NX) && !(efer & EFER_NX)) {
+       if (entry && (entry->edx & (1 << 20)) && !(efer & EFER_NX)) {
                entry->edx &= ~(1 << 20);
-               printk(KERN_INFO ": guest NX capability removed\n");
+               printk(KERN_INFO "kvm: guest NX capability removed\n");
        }
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to