mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: x86: Sanitize writes to MSR_KVM_PV_EOI_EN
@ 2021-11-08 15:28 Vitaly Kuznetsov
  2021-11-08 15:28 ` [PATCH 1/2] KVM: x86: Rename kvm_lapic_enable_pv_eoi() Vitaly Kuznetsov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vitaly Kuznetsov @ 2021-11-08 15:28 UTC (permalink / raw)
  To: kvm, Paolo Bonzini
  Cc: Sean Christopherson, Wanpeng Li, Jim Mattson, Li RongQing, linux-kernel

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/1636078404-48617-1-git-send-email-lirongqing@baidu.com/

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(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-11-11 13:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-08 15:28 [PATCH 0/2] KVM: x86: Sanitize writes to MSR_KVM_PV_EOI_EN Vitaly Kuznetsov
2021-11-08 15:28 ` [PATCH 1/2] KVM: x86: Rename kvm_lapic_enable_pv_eoi() Vitaly Kuznetsov
2021-11-08 15:28 ` [PATCH 2/2] KVM: x86: Don't update vcpu->arch.pv_eoi.msr_val when a bogus value was written to MSR_KVM_PV_EOI_EN Vitaly Kuznetsov
2021-11-11 13:59 ` [PATCH 0/2] KVM: x86: Sanitize writes " Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®