Skip to content

KVM: x86: Enhance vendor module error messages

Sean Christopherson kvm lkml 1 version Applied

Status from this message: Queued, thanks. But I kept the ratelimiting; given the recent "clashes" with the chief penguin, I am also ratelimiting the snark in the commit messages.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2KVM: x86: Add vendor name to kvm_x86_ops, use it for error messagesarch/x86/include/asm/kvm_host.h arch/x86/kvm/svm/svm.c arch/x86/kvm/vmx/vmx.c +1 more+11 -33 replies
2/2KVM: x86: Defer "already loaded" check until after basic support checksarch/x86/kvm/x86.c+5 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] KVM: x86: Enhance vendor module error messages

Paul Menzel encountered the bad userspace behavior of spamming KVM module loading on all CPUs, which was mitigated by commit ef935c25fd64 ("kvm: x86:
Limit the number of "kvm: disabled by bios" messages"), except this time userspace is extra "clever" and spams both kvm_intel and kvm_amd. Because the "already loaded the other module" message isn't ratelimited, the bogus module load managed to spam the kernel log.

Patch 1 addresses another suggestion from Paul by incorporating the vendor module name into the error messages.

Patch 2 addresses the original report by prioritizing the hardware/bios support messages over the "already loaded" error. In additional to reducing spam, doing so also ensures consistent messaging if a vendor module isn't supported regardless of what other modules may be loaded.

[*] https://lkml.kernel.org/r/[email protected]

Sean Christopherson (2):
KVM: x86: Add vendor name to kvm_x86_ops, use it for error messages
KVM: x86: Defer "already loaded" check until after basic support
checks

 arch/x86/include/asm/kvm_host.h |  2 ++
 arch/x86/kvm/svm/svm.c          |  2 ++
 arch/x86/kvm/vmx/vmx.c          |  2 ++
 arch/x86/kvm/x86.c              | 17 +++++++++--------
 4 files changed, 15 insertions(+), 8 deletions(-)
Signature · 1 line
2.33.0.1079.g6e70778dc9-goog