On 3/3/22 02:43, Sean Christopherson wrote:
Maybe I can redirect you to a test case to highlight a possible
regression in KVM, as seen by userspace;-)
Regressions aside, VMCS controls are not tied to CPUID, KVM should not be mucking
with unrelated things. The original hack was to fix a userspace bug and should
never have been mreged.
Note that it dates back to:
commit 5f76f6f5ff96587af5acd5930f7d9fea81e0d1a8
Author: Liran Alon <liran.alon@xxxxxxxxxx>
Date: Fri Sep 14 03:25:52 2018 +0300
KVM: nVMX: Do not expose MPX VMX controls when guest MPX disabled
Before this commit, KVM exposes MPX VMX controls to L1 guest only based
on if KVM and host processor supports MPX virtualization.
However, these controls should be exposed to guest only in case guest
vCPU supports MPX.
It's not to fix a userspace bug, it's to support userspace that doesn't
know about using KVM_SET_MSR for VMX features---which is okay since unlike
KVM_SET_CPUID2 it's not a mandatory call.
Paolo