repository: /home/avi/kvm/linux-2.6
branch: master
commit 0d84c92a54aff9ca6f9e25f4551d1af34eb59a8c
Author: Avi Kivity <[EMAIL PROTECTED]>
Date:   Mon Nov 26 18:30:07 2007 +0200

    KVM: Fix cpuid2 killing 32-bit guests on non-NX machines
    
    KVM_SET_CPUID fails to remove NX when the host doesn't support it, as 
previous
    versions do.  On the other hand, KVM_SET_CPUID2 removes the feature even
    though, since we tell userspace about it, it shouldn't be necessary.
    
    Swap the two cases.
    
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c
index 49651ad..c70ac33 100644
--- a/drivers/kvm/x86.c
+++ b/drivers/kvm/x86.c
@@ -748,6 +748,7 @@ static int kvm_vcpu_ioctl_set_cpuid(struct kvm_vcpu *vcpu,
                vcpu->cpuid_entries[i].padding[2] = 0;
        }
        vcpu->cpuid_nent = cpuid->nent;
+       cpuid_fix_nx_cap(vcpu);
        r = 0;
 
 out_free:
@@ -770,7 +771,6 @@ static int kvm_vcpu_ioctl_set_cpuid2(struct kvm_vcpu *vcpu,
                           cpuid->nent * sizeof(struct kvm_cpuid_entry2)))
                goto out;
        vcpu->cpuid_nent = cpuid->nent;
-       cpuid_fix_nx_cap(vcpu);
        return 0;
 
 out:

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-commits mailing list
kvm-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-commits

Reply via email to