| From: |
| Sean Christopherson <seanjc-AT-google.com> |
| To: |
| Thomas Gleixner <tglx-AT-linutronix.de>, Ingo Molnar <mingo-AT-redhat.com>, Borislav Petkov <bp-AT-alien8.de>, Dave Hansen <dave.hansen-AT-linux.intel.com>, x86-AT-kernel.org, Sean Christopherson <seanjc-AT-google.com>, Paolo Bonzini <pbonzini-AT-redhat.com> |
| Subject: |
| [PATCH 0/8] x86/irq: KVM: Optimize KVM's PIR harvesting |
| Date: |
| Fri, 14 Mar 2025 20:06:21 -0700 |
| Message-ID: |
| <20250315030630.2371712-1-seanjc@google.com> |
| Cc: |
| linux-kernel-AT-vger.kernel.org, kvm-AT-vger.kernel.org, Jacob Pan <jacob.jun.pan-AT-linux.intel.com>, Jim Mattson <jmattson-AT-google.com> |
| Archive-link: |
| Article |
Optimizing KVM's PIR harvesting using the same techniques as posted MSIs,
most notably to use 8-byte accesses on 64-bit kernels (/facepalm).
Fix a few warts along the way, and finish up by adding a helper to dedup
the PIR harvesting code between KVM and posted MSIs.
Sean Christopherson (8):
x86/irq: Ensure initial PIR loads are performed exactly once
x86/irq: Track if IRQ was found in PIR during initial loop (to load
PIR vals)
KVM: VMX: Ensure vIRR isn't reloaded at odd times when sync'ing PIR
x86/irq: KVM: Track PIR bitmap as an "unsigned long" array
KVM: VMX: Process PIR using 64-bit accesses on 64-bit kernels
KVM: VMX: Isolate pure loads from atomic XCHG when processing PIR
KVM: VMX: Use arch_xchg() when processing PIR to avoid instrumentation
x86/irq: KVM: Add helper for harvesting PIR to deduplicate KVM and
posted MSIs
arch/x86/include/asm/posted_intr.h | 79 +++++++++++++++++++++++++++---
arch/x86/kernel/irq.c | 63 ++++--------------------
arch/x86/kvm/lapic.c | 20 ++++----
arch/x86/kvm/lapic.h | 4 +-
arch/x86/kvm/vmx/posted_intr.h | 2 +-
5 files changed, 96 insertions(+), 72 deletions(-)
base-commit: c9ea48bb6ee6b28bbc956c1e8af98044618fed5e
--
2.49.0.rc1.451.g8f38331e32-goog