Skip to content

KVM: x86: Sanitize writes to MSR_KVM_PV_EOI_EN

Vitaly Kuznetsov kvm lkml 1 version Applied

Status from this message: Queued, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2KVM: x86: Rename kvm_lapic_enable_pv_eoi()arch/x86/kvm/hyperv.c arch/x86/kvm/lapic.c arch/x86/kvm/lapic.h +1 more+5 -50 replies
2/2KVM: x86: Don't update vcpu->arch.pv_eoi.msr_val when a bogus value was written to MSR_KVM_PV_EOI_ENarch/x86/kvm/lapic.c+13 -80 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: Sanitize writes to MSR_KVM_PV_EOI_EN

This is a continuation of work started by Li RongQing with "[PATCH] KVM: x86: disable pv eoi if guest gives a wrong address":
https://lore.kernel.org/kvm/[email protected]/

Instead of resetting 'KVM_MSR_ENABLED' when a bogus address was written to MSR_KVM_PV_EOI_EN I suggest we refuse to update MSR at all, this aligns with #GP which is being injected on such writes.

Vitaly Kuznetsov (2):
KVM: x86: Rename kvm_lapic_enable_pv_eoi()
KVM: x86: Don't update vcpu->arch.pv_eoi.msr_val when a bogus value
was written to MSR_KVM_PV_EOI_EN

 arch/x86/kvm/hyperv.c |  4 ++--
 arch/x86/kvm/lapic.c  | 23 ++++++++++++++---------
 arch/x86/kvm/lapic.h  |  2 +-
 arch/x86/kvm/x86.c    |  2 +-
 4 files changed, 18 insertions(+), 13 deletions(-)
Signature · 1 line
2.31.1