]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Add vendor name to kvm_x86_ops, use it for error messages
authorSean Christopherson <seanjc@google.com>
Mon, 18 Oct 2021 18:39:28 +0000 (11:39 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 22 Oct 2021 09:19:28 +0000 (05:19 -0400)
commit33e76988d9dea019d38a54dbd7a832cdc17b14ce
tree5d1c59429825ca3bd11b725d963591f26872fa88
parent57fbbb5cb984ea0b4e7a4ffabf0709f0aa180381
KVM: x86: Add vendor name to kvm_x86_ops, use it for error messages

Paul pointed out the error messages when KVM fails to load are unhelpful
in understanding exactly what went wrong if userspace probes the "wrong"
module.

Add a mandatory kvm_x86_ops field to track vendor module names, kvm_intel
and kvm_amd, and use the name for relevant error message when KVM fails
to load so that the user knows which module failed to load.

Opportunistically tweak the "disabled by bios" error message to clarify
that _support_ was disabled, not that the module itself was magically
disabled by BIOS.

Suggested-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20211018183929.897461-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm/svm.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/x86.c