diff options
author | 2019-09-05 11:40:54 +0200 | |
---|---|---|
committer | 2019-09-05 11:40:54 +0200 | |
commit | 151a41014bff92f353263cadc051435dc9c3258e (patch) | |
tree | aa082a0745edd5b7051668f455dfc0ee1e4a9de0 /arch/x86/kvm/hyperv.c | |
parent | gpio: Fix up merge collision in include file (diff) | |
parent | Linux 5.3-rc7 (diff) | |
download | wireguard-linux-151a41014bff92f353263cadc051435dc9c3258e.tar.xz wireguard-linux-151a41014bff92f353263cadc051435dc9c3258e.zip |
Merge tag 'v5.3-rc7' into devel
Linux 5.3-rc7
Diffstat (limited to '')
-rw-r--r-- | arch/x86/kvm/hyperv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index c10a8b10b203..fff790a3f4ee 100644 --- a/arch/x86/kvm/hyperv.c +++ b/arch/x86/kvm/hyperv.c @@ -1781,7 +1781,7 @@ int kvm_vm_ioctl_hv_eventfd(struct kvm *kvm, struct kvm_hyperv_eventfd *args) int kvm_vcpu_ioctl_get_hv_cpuid(struct kvm_vcpu *vcpu, struct kvm_cpuid2 *cpuid, struct kvm_cpuid_entry2 __user *entries) { - uint16_t evmcs_ver = kvm_x86_ops->nested_get_evmcs_version(vcpu); + uint16_t evmcs_ver = 0; struct kvm_cpuid_entry2 cpuid_entries[] = { { .function = HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS }, { .function = HYPERV_CPUID_INTERFACE }, @@ -1793,6 +1793,9 @@ int kvm_vcpu_ioctl_get_hv_cpuid(struct kvm_vcpu *vcpu, struct kvm_cpuid2 *cpuid, }; int i, nent = ARRAY_SIZE(cpuid_entries); + if (kvm_x86_ops->nested_get_evmcs_version) + evmcs_ver = kvm_x86_ops->nested_get_evmcs_version(vcpu); + /* Skip NESTED_FEATURES if eVMCS is not supported */ if (!evmcs_ver) --nent; |