summaryrefslogtreecommitdiffstats
path: root/arch/x86/xen
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2020-10-01 15:05:39 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-10-21 23:36:32 +0200
commitf69858fcc727f8098419f3c595678e671bd2d8b7 (patch)
treeb4c544ec4287050ace8cd563b5dba21ecffb4c4e /arch/x86/xen
parentDocumentation: kvm: fix some typos in cpuid.rst (diff)
downloadlinux-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