diff options
author | Sean Christopherson <seanjc@google.com> | 2025-05-01 11:10:39 -0700 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2025-08-18 14:23:08 +0200 |
commit | 28d11e4548b75d0960429344f12d5f6cc9cee25b (patch) | |
tree | 42bad47f64aaba8efd8af4ba493e27de902b7eee /scripts/gdb/linux/timerlist.py | |
parent | deed19b9b28724bd32e85063c60718c0a6803906 (diff) |
x86/fred: KVM: VMX: Always use FRED for IRQs when CONFIG_X86_FRED=y
Now that FRED provides C-code entry points for handling IRQs, use the
FRED infrastructure for forwarding IRQs even if FRED is fully
disabled, e.g. isn't supported in hardware. Avoiding the non-FRED
assembly trampolines into the IDT handlers for IRQs eliminates the
associated non-CFI indirect call (KVM performs a CALL by doing a
lookup on the IDT using the IRQ vector).
Keep NMIs on the legacy IDT path, as the FRED NMI entry code relies on
FRED's architectural behavior with respect to NMI blocking, i.e. doesn't
jump through the myriad hoops needed to deal with IRET "unexpectedly"
unmasking NMIs. KVM's NMI path already makes a direct CALL to C-code,
i.e. isn't problematic for CFI. KVM does make a short detour through
assembly code to build the stack frame, but the "FRED entry from KVM"
path does the same.
Force FRED for 64-bit kernels if KVM_INTEL is enabled, as the benefits of
eliminating the IRQ trampoline usage far outwieghts the code overhead for
FRED.
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20250714103441.381946911@infradead.org
Diffstat (limited to 'scripts/gdb/linux/timerlist.py')
0 files changed, 0 insertions, 0 deletions