mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 00/10] KVM: x86: Fix LVTPC masking on AMD CPUs
@ 2024-04-05 23:55 Sean Christopherson
  2024-04-05 23:55 ` [PATCH 01/10] KVM: x86: Snapshot if a vCPU's vendor model is AMD vs. Intel compatible Sean Christopherson
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Sean Christopherson @ 2024-04-05 23:55 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini
  Cc: kvm, linux-kernel, Sandipan Das, Jim Mattson, Like Xu

This is kinda sorta v2 of Sandipan's fix for KVM's incorrect setting of
the MASK bit when delivering PMIs through the LVTPC.

It's a bit rushed, as I want to get Sandipan's fix applied early next
week so that it can make its way to Linus' tree for -rc4.  And I didn't
want to apply Sandipan's patch as-is, because I'm a little paranoid that
the guest CPUID check could be noticeable slow, and it's easy to avoid.

My plan is to grab patches 1-2 for 6.9 asap, and let the rest simmer for
much, much longer (they are *very* lightly tested).

As for why this looks wildy different than Sandipan's compat_vendor idea,
when I started looking at KVM's various AMD vs. Intel checks, I realized
it makes no sense to support an "unknown" vendor.  KVM can't do *nothing*,
and so practically speaking, an "unknown" vendor vCPU would actually end
up with a weird mix of AMD *and* Intel behavior, not AMD *or* Intel
behavior.

Sandipan Das (1):
  KVM: x86/pmu: Do not mask LVTPC when handling a PMI on AMD platforms

Sean Christopherson (9):
  KVM: x86: Snapshot if a vCPU's vendor model is AMD vs. Intel
    compatible
  KVM: x86/pmu: Squash period for checkpointed events based on host
    HLE/RTM
  KVM: x86: Apply Intel's TSC_AUX reserved-bit behavior to Intel compat
    vCPUs
  KVM: x86: Inhibit code #DBs in MOV-SS shadow for all Intel compat
    vCPUs
  KVM: x86: Use "is Intel compatible" helper to emulate SYSCALL in
    !64-bit
  KVM: SVM: Emulate SYSENTER RIP/RSP behavior for all Intel compat vCPUs
  KVM: x86: Allow SYSENTER in Compatibility Mode for all Intel compat
    vCPUs
  KVM: x86: Open code vendor_intel() in string_registers_quirk()
  KVM: x86: Bury guest_cpuid_is_amd_or_hygon() in cpuid.c

 arch/x86/include/asm/kvm_host.h |  1 +
 arch/x86/kvm/cpuid.c            | 13 ++++++
 arch/x86/kvm/cpuid.h            | 16 ++------
 arch/x86/kvm/emulate.c          | 71 ++++++++++-----------------------
 arch/x86/kvm/kvm_emulate.h      |  1 +
 arch/x86/kvm/lapic.c            |  3 +-
 arch/x86/kvm/mmu/mmu.c          |  2 +-
 arch/x86/kvm/pmu.c              |  2 +-
 arch/x86/kvm/svm/svm.c          | 14 +++----
 arch/x86/kvm/x86.c              | 30 ++++++++------
 10 files changed, 68 insertions(+), 85 deletions(-)


base-commit: 8cb4a9a82b21623dbb4b3051dd30d98356cf95bc
-- 
2.44.0.478.gd926399ef9-goog


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

end of thread, other threads:[~2024-06-12  1:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-05 23:55 [PATCH 00/10] KVM: x86: Fix LVTPC masking on AMD CPUs Sean Christopherson
2024-04-05 23:55 ` [PATCH 01/10] KVM: x86: Snapshot if a vCPU's vendor model is AMD vs. Intel compatible Sean Christopherson
2024-04-05 23:55 ` [PATCH 02/10] KVM: x86/pmu: Do not mask LVTPC when handling a PMI on AMD platforms Sean Christopherson
2024-04-05 23:55 ` [PATCH 03/10] KVM: x86/pmu: Squash period for checkpointed events based on host HLE/RTM Sean Christopherson
2024-04-05 23:55 ` [PATCH 04/10] KVM: x86: Apply Intel's TSC_AUX reserved-bit behavior to Intel compat vCPUs Sean Christopherson
2024-04-05 23:55 ` [PATCH 05/10] KVM: x86: Inhibit code #DBs in MOV-SS shadow for all " Sean Christopherson
2024-04-05 23:55 ` [PATCH 06/10] KVM: x86: Use "is Intel compatible" helper to emulate SYSCALL in !64-bit Sean Christopherson
2024-04-05 23:56 ` [PATCH 07/10] KVM: SVM: Emulate SYSENTER RIP/RSP behavior for all Intel compat vCPUs Sean Christopherson
2024-04-05 23:56 ` [PATCH 08/10] KVM: x86: Allow SYSENTER in Compatibility Mode " Sean Christopherson
2024-04-05 23:56 ` [PATCH 09/10] KVM: x86: Open code vendor_intel() in string_registers_quirk() Sean Christopherson
2024-04-05 23:56 ` [PATCH 10/10] KVM: x86: Bury guest_cpuid_is_amd_or_hygon() in cpuid.c Sean Christopherson
2024-04-09  2:01 ` [PATCH 00/10] KVM: x86: Fix LVTPC masking on AMD CPUs Sean Christopherson
2024-04-11 17:03 ` Paolo Bonzini
2024-06-12  1:18 ` Sean Christopherson

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®