diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2020-10-01 15:05:39 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-10-21 23:36:32 +0200 |
commit | f69858fcc727f8098419f3c595678e671bd2d8b7 (patch) | |
tree | b4c544ec4287050ace8cd563b5dba21ecffb4c4e /arch/x86/xen | |
parent | Documentation: kvm: fix some typos in cpuid.rst (diff) | |
download | linux-f69858fcc727f8098419f3c595678e671bd2d8b7.tar.xz linux-f69858fcc727f8098419f3c595678e671bd2d8b7.zip |
KVM: x86: disconnect kvm_check_cpuid() from vcpu->arch.cpuid_entries
As a preparatory step to allocating vcpu->arch.cpuid_entries dynamically
make kvm_check_cpuid() check work with an arbitrary 'struct kvm_cpuid_entry2'
array.
Currently, when kvm_check_cpuid() fails we reset vcpu->arch.cpuid_nent to
0 and this is kind of weird, i.e. one would expect CPUIDs to remain
unchanged when KVM_SET_CPUID[2] call fails.
No functional change intended. It would've been possible to move the updated
kvm_check_cpuid() in kvm_vcpu_ioctl_set_cpuid2() and check the supplied
input before we start updating vcpu->arch.cpuid_entries/nent but we
can't do the same in kvm_vcpu_ioctl_set_cpuid() as we'll have to copy
'struct kvm_cpuid_entry' entries first. The change will be made when
vcpu->arch.cpuid_entries[] array becomes allocated dynamically.
Suggested-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20201001130541.1398392-2-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/xen')
0 files changed, 0 insertions, 0 deletions