All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] RFC: KVM: SVM: Allow L1's AVIC to co-exist with nesting
@ 2021-12-09 11:54 Maxim Levitsky
  2021-12-09 11:54 ` [PATCH 1/6] KVM: SVM: allow to force AVIC to be enabled Maxim Levitsky
                   ` (5 more replies)
  0 siblings, 6 replies; 21+ messages in thread
From: Maxim Levitsky @ 2021-12-09 11:54 UTC (permalink / raw)
  To: kvm
  Cc: open list:X86 ARCHITECTURE (32-BIT AND 64-BIT),
	Wanpeng Li, Dave Hansen, Joerg Roedel, H. Peter Anvin,
	Paolo Bonzini, Vitaly Kuznetsov, Borislav Petkov,
	maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),
	Ingo Molnar, Thomas Gleixner, Jim Mattson, Sean Christopherson,
	Maxim Levitsky

This patch series aims to lift long standing restriction of
using AVIC only when nested virtualization is not exposed
to the guest.

Notes about specific patches:

Patch 1 addresses the fact that AVIC appears to be disabled
in CPUID on several Milan systems I am tesing on.
This adds a workaround (with a big warning and a kernel taint) to enable
it anyway if you really know what you are doing.

It is possible that those systems have the AVIC disabled as a workaround
for the AVIC errata #1235 which might be already fixed but OEM might
not yet re-enabled it out of caution.

Patch 6 adds the AVIC co-existance itself, and was tested with a modification
of the ipi_stress unit test which I soon post upstream which made one
of vCPUs enter nested guest and receive the IPI while nested guest is running.

It was tested on a Zen3 (Milan) machine. On Zen2 machines I have errata #1235
makes my test fail quite fast.

Best regards,
	Maxim Levitsky

Maxim Levitsky (6):
  KVM: SVM: allow to force AVIC to be enabled
  KVM: x86: add a tracepoint for APICv/AVIC interrupt delivery
  KVM: SVM: fix AVIC race of host->guest IPI delivery vs AVIC inhibition
  KVM: SVM: fix races in the AVIC incomplete IPI delivery to vCPUs
  KVM: x86: never clear irr_pending in kvm_apic_update_apicv
  KVM: SVM: allow AVIC to co-exist with a nested guest running

 arch/x86/include/asm/kvm-x86-ops.h |  1 +
 arch/x86/include/asm/kvm_host.h    |  7 +++++-
 arch/x86/kvm/lapic.c               |  6 ++++-
 arch/x86/kvm/svm/avic.c            | 35 +++++++++++++++++++++++-----
 arch/x86/kvm/svm/nested.c          | 13 ++++++-----
 arch/x86/kvm/svm/svm.c             | 37 +++++++++++++++++++-----------
 arch/x86/kvm/svm/svm.h             |  1 +
 arch/x86/kvm/trace.h               | 24 +++++++++++++++++++
 arch/x86/kvm/x86.c                 | 17 ++++++++++++--
 9 files changed, 111 insertions(+), 30 deletions(-)

-- 
2.26.3



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

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

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-09 11:54 [PATCH 0/6] RFC: KVM: SVM: Allow L1's AVIC to co-exist with nesting Maxim Levitsky
2021-12-09 11:54 ` [PATCH 1/6] KVM: SVM: allow to force AVIC to be enabled Maxim Levitsky
2021-12-09 11:54 ` [PATCH 2/6] KVM: x86: add a tracepoint for APICv/AVIC interrupt delivery Maxim Levitsky
2021-12-09 11:54 ` [PATCH 3/6] KVM: SVM: fix AVIC race of host->guest IPI delivery vs AVIC inhibition Maxim Levitsky
2021-12-09 14:11   ` Paolo Bonzini
2021-12-09 14:26     ` Maxim Levitsky
2021-12-09 15:27       ` Sean Christopherson
2021-12-09 15:33         ` Maxim Levitsky
2021-12-09 15:35           ` Maxim Levitsky
2021-12-09 11:54 ` [PATCH 4/6] KVM: SVM: fix races in the AVIC incomplete IPI delivery to vCPUs Maxim Levitsky
2021-12-09 15:38   ` Sean Christopherson
2021-12-10 11:37     ` Paolo Bonzini
2021-12-09 11:54 ` [PATCH 5/6] KVM: x86: never clear irr_pending in kvm_apic_update_apicv Maxim Levitsky
2021-12-09 14:12   ` Paolo Bonzini
2021-12-09 15:03     ` Maxim Levitsky
2021-12-10 12:07   ` Paolo Bonzini
2021-12-10 12:20     ` Maxim Levitsky
2021-12-10 12:47       ` Maxim Levitsky
2021-12-10 13:03         ` Paolo Bonzini
2021-12-10 13:10           ` Maxim Levitsky
2021-12-09 11:54 ` [PATCH 6/6] KVM: SVM: allow AVIC to co-exist with a nested guest running Maxim Levitsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.