Skip to contentSkip to conversation

KVM: x86: Enforce EFER bits according to CPUID

PATCH Paolo Bonzini 1 participant 1 message Apr 10, 2019 1 message not in the archive KVM

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Paolo Bonzini

author maintainer Applied
#1 lore raw
Quoted 5 lines · Sean Christopherson

KVM currently doesn't prevent the guest from setting EFER bits that should be reserved based on the guest's CPUID model. For example, a 64-bit guest kernel can set EFER.LME and enter long mode even if userspace reports X86_FEATURE_LM=0 for its guest.

Quoted 7 lines

Sean Christopherson (2):
KVM: x86: Skip EFER vs. guest CPUID checks for host-initiated writes
KVM: x86: Inject #GP if guest attempts to set unsupported EFER bits

 arch/x86/kvm/x86.c | 44 +++++++++++++++++++++++++++++++-------------
 1 file changed, 31 insertions(+), 13 deletions(-)

Queued, thanks.

Paolo