summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2020-09-29 17:09:43 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-11-15 09:49:11 -0500
commitc21d54f0307ff42a346294899107b570b98c47b5 (patch)
tree4a1f60de45aacaec33058ec3cd4c8712b3d8cabd /include
parentb59e00dd8cda75fc8303c9f6847ac720b10664e3 (diff)
downloadlinux-stable-c21d54f0307ff42a346294899107b570b98c47b5.tar.gz
linux-stable-c21d54f0307ff42a346294899107b570b98c47b5.tar.bz2
linux-stable-c21d54f0307ff42a346294899107b570b98c47b5.zip
KVM: x86: hyper-v: allow KVM_GET_SUPPORTED_HV_CPUID as a system ioctl
KVM_GET_SUPPORTED_HV_CPUID is a vCPU ioctl but its output is now independent from vCPU and in some cases VMMs may want to use it as a system ioctl instead. In particular, QEMU doesn CPU feature expansion before any vCPU gets created so KVM_GET_SUPPORTED_HV_CPUID can't be used. Convert KVM_GET_SUPPORTED_HV_CPUID to 'dual' system/vCPU ioctl with the same meaning. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Message-Id: <20200929150944.1235688-2-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/kvm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index ca41220b40b8..204afbe1240e 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -1053,6 +1053,7 @@ struct kvm_ppc_resize_hpt {
#define KVM_CAP_X86_USER_SPACE_MSR 188
#define KVM_CAP_X86_MSR_FILTER 189
#define KVM_CAP_ENFORCE_PV_FEATURE_CPUID 190
+#define KVM_CAP_SYS_HYPERV_CPUID 191
#ifdef KVM_CAP_IRQ_ROUTING
@@ -1511,7 +1512,7 @@ struct kvm_enc_region {
/* Available with KVM_CAP_MANUAL_DIRTY_LOG_PROTECT_2 */
#define KVM_CLEAR_DIRTY_LOG _IOWR(KVMIO, 0xc0, struct kvm_clear_dirty_log)
-/* Available with KVM_CAP_HYPERV_CPUID */
+/* Available with KVM_CAP_HYPERV_CPUID (vcpu) / KVM_CAP_SYS_HYPERV_CPUID (system) */
#define KVM_GET_SUPPORTED_HV_CPUID _IOWR(KVMIO, 0xc1, struct kvm_cpuid2)
/* Available with KVM_CAP_ARM_SVE */