All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH v3 00/20] x86: Better backtraces for leaf functions
@ 2026-05-14 21:04 Sean Christopherson
  2026-05-14 21:04 ` [kvm-unit-tests PATCH v3 01/20] x86/vmx: Drop unused SYSENTER "support" in nested VMX infrastructure Sean Christopherson
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: Sean Christopherson @ 2026-05-14 21:04 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kvm, Sean Christopherson, Mathias Krause, Andrew Jones

Finally re-posting Mathias' work to provide better backtraces on x86, which
was blocked by a fatal bug in the nVMX SIPI test that was exposed by the
stack frame side effects.  This has been sitting on my local system(s) for
something like 5 months, and I all but forgot I hadn't posted it.

Most of this series is cleaning up the nVMX and nSVM to play nice with
multi-CPU tests.  Then to fix the race in the problematic SIPI, abuse the
VM-Entry MSR load list to atomically detect VM-Enter (I'm still proud of
that hack).

For gory details:

https://lore.kernel.org/all/3bac29b9-4c49-4e5d-997e-9e4019a2fceb@grsecurity.net

Mathias Krause (3):
  x86/vmx: Initialize test stage in SIPI test *before* launching AP
    thread
  x86: Better backtraces for leaf functions
  x86: Prevent realmode test code instrumentation with nop-mcount

Sean Christopherson (17):
  x86/vmx: Drop unused SYSENTER "support" in nested VMX infrastructure
  x86/vmx: Drop unused guest_regs "support" in nested VMX infrastructure
  x86/svm: Sort (and swap) GPRs by their index, not alphabetically
  x86: Dedup guest/host context switch of registers across SVM and VMX
  x86/virt: Use macro shenanigans to get reg offsets when swapping
    guest/host regs
  x86/virt: Track "guest regs" using per-CPU variable
  x86/svm: Don't VMLOAD/VMSAVE "guest" state around VMRUN
  x86/vmx: Use separate VMCSes for BSP vs. AP in INIT test
  x86/vmx: Swap GPRs after checking "launched" status
  x86/vmx: Track VMCS "launched" state per-CPU
  x86/vmx: Track "is this CPU in guest mode" per-CPU
  x86/vmx: Communicate hypercalls via RAX, not a global field
  x86/kvmclock: Replace spaces with tabs
  x86/kvmclock: Skip kvmclock test when not running on KVM with
    CLOCKSOURCE2
  x86/vmx: Tag "struct vmx_msr_entry" as needing to be 16-byte aligned
  x86/smp: Align the stack to a 16-byte boundary when invoking SMP
    function calls
  x86/vmx: Write to KVM's WALL_CLOCK MSR via VM-Entry load list sync in
    SIPI test

 lib/x86/processor.h |  15 +++
 lib/x86/smp.c       |  21 ++++-
 lib/x86/smp.h       |  32 +++++++
 lib/x86/virt.h      |  61 ++++++++++++
 x86/Makefile.common |  14 +++
 x86/kvmclock.c      |  42 ++++-----
 x86/kvmclock.h      |   2 +
 x86/kvmclock_test.c | 225 +++++++++++++++++++++++---------------------
 x86/realmode.c      |   3 +
 x86/svm.c           |  19 ++--
 x86/svm.h           |  61 ++----------
 x86/svm_tests.c     |   5 +-
 x86/vmx.c           | 121 +++++++++++-------------
 x86/vmx.h           |  72 +-------------
 x86/vmx_tests.c     | 134 ++++++++++++++++----------
 15 files changed, 443 insertions(+), 384 deletions(-)
 create mode 100644 lib/x86/virt.h


base-commit: 4d60e2429d63dc0c24990114a8afc89e86c187cc
-- 
2.54.0.563.g4f69b47b94-goog


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

end of thread, other threads:[~2026-05-14 21:05 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-14 21:04 [kvm-unit-tests PATCH v3 00/20] x86: Better backtraces for leaf functions Sean Christopherson
2026-05-14 21:04 ` [kvm-unit-tests PATCH v3 01/20] x86/vmx: Drop unused SYSENTER "support" in nested VMX infrastructure Sean Christopherson
2026-05-14 21:04 ` [kvm-unit-tests PATCH v3 02/20] x86/vmx: Drop unused guest_regs " Sean Christopherson
2026-05-14 21:04 ` [kvm-unit-tests PATCH v3 03/20] x86/svm: Sort (and swap) GPRs by their index, not alphabetically Sean Christopherson
2026-05-14 21:04 ` [kvm-unit-tests PATCH v3 04/20] x86: Dedup guest/host context switch of registers across SVM and VMX Sean Christopherson
2026-05-14 21:04 ` [kvm-unit-tests PATCH v3 05/20] x86/virt: Use macro shenanigans to get reg offsets when swapping guest/host regs Sean Christopherson
2026-05-14 21:04 ` [kvm-unit-tests PATCH v3 06/20] x86/virt: Track "guest regs" using per-CPU variable Sean Christopherson
2026-05-14 21:04 ` [kvm-unit-tests PATCH v3 07/20] x86/svm: Don't VMLOAD/VMSAVE "guest" state around VMRUN Sean Christopherson
2026-05-14 21:04 ` [kvm-unit-tests PATCH v3 08/20] x86/vmx: Use separate VMCSes for BSP vs. AP in INIT test Sean Christopherson
2026-05-14 21:04 ` [kvm-unit-tests PATCH v3 09/20] x86/vmx: Swap GPRs after checking "launched" status Sean Christopherson
2026-05-14 21:04 ` [kvm-unit-tests PATCH v3 10/20] x86/vmx: Track VMCS "launched" state per-CPU Sean Christopherson
2026-05-14 21:04 ` [kvm-unit-tests PATCH v3 11/20] x86/vmx: Track "is this CPU in guest mode" per-CPU Sean Christopherson
2026-05-14 21:04 ` [kvm-unit-tests PATCH v3 12/20] x86/vmx: Communicate hypercalls via RAX, not a global field Sean Christopherson
2026-05-14 21:04 ` [kvm-unit-tests PATCH v3 13/20] x86/vmx: Initialize test stage in SIPI test *before* launching AP thread Sean Christopherson
2026-05-14 21:04 ` [kvm-unit-tests PATCH v3 14/20] x86/kvmclock: Replace spaces with tabs Sean Christopherson
2026-05-14 21:04 ` [kvm-unit-tests PATCH v3 15/20] x86/kvmclock: Skip kvmclock test when not running on KVM with CLOCKSOURCE2 Sean Christopherson
2026-05-14 21:04 ` [kvm-unit-tests PATCH v3 16/20] x86/vmx: Tag "struct vmx_msr_entry" as needing to be 16-byte aligned Sean Christopherson
2026-05-14 21:04 ` [kvm-unit-tests PATCH v3 17/20] x86/smp: Align the stack to a 16-byte boundary when invoking SMP function calls Sean Christopherson
2026-05-14 21:04 ` [kvm-unit-tests PATCH v3 18/20] x86/vmx: Write to KVM's WALL_CLOCK MSR via VM-Entry load list sync in SIPI test Sean Christopherson
2026-05-14 21:04 ` [kvm-unit-tests PATCH v3 19/20] x86: Better backtraces for leaf functions Sean Christopherson
2026-05-14 21:05 ` [kvm-unit-tests PATCH v3 20/20] x86: Prevent realmode test code instrumentation with nop-mcount Sean Christopherson

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.