diff options
author | Avi Kivity <avi@qumranet.com> | 2007-11-26 18:30:07 +0200 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-11-26 18:30:07 +0200 |
commit | 0d84c92a54aff9ca6f9e25f4551d1af34eb59a8c (patch) | |
tree | d66c17ece330d30c4da54c614f4b1542573094cb | |
parent | d1923b98c89ec7d5fbcd852d07bd987e16aea02a (diff) |
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 <avi@qumranet.com>
-rw-r--r-- | drivers/kvm/x86.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c index 49651adb4e66..c70ac335dae7 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: |