diff options
| author | Vishal Verma <[email protected]> | 2025-03-18 06:35:09 +0000 |
|---|---|---|
| committer | Sean Christopherson <[email protected]> | 2025-05-02 20:37:26 +0000 |
| commit | 907092bf7cbddee4381729f23a33780d84b1bb7c (patch) | |
| tree | 0999427b4ec847340c23cade88966176c6458d94 /rust/helpers/mutex.c | |
| parent | KVM: VMX: Define a VMX glue macro for kvm_complete_insn_gp() (diff) | |
| download | kernel-907092bf7cbddee4381729f23a33780d84b1bb7c.tar.gz kernel-907092bf7cbddee4381729f23a33780d84b1bb7c.zip | |
KVM: VMX: Clean up and macrofy x86_ops
Eliminate a lot of stub definitions by using macros to define the TDX vs
non-TDX versions of various x86_ops. Moving the x86_ops wrappers under
CONFIG_KVM_INTEL_TDX also allows nearly all of vmx/main.c to go under a
single #ifdef, eliminating trampolines in the generated code, and almost
all of the stubs.
For example, with CONFIG_KVM_INTEL_TDX=n, before this cleanup,
vt_refresh_apicv_exec_ctrl() would produce:
0000000000036490 <vt_refresh_apicv_exec_ctrl>:
36490: f3 0f 1e fa endbr64
36494: e8 00 00 00 00 call 36499 <vt_refresh_apicv_exec_ctrl+0x9>
36495: R_X86_64_PLT32 __fentry__-0x4
36499: e9 00 00 00 00 jmp 3649e <vt_refresh_apicv_exec_ctrl+0xe>
3649a: R_X86_64_PLT32 vmx_refresh_apicv_exec_ctrl-0x4
3649e: 66 90 xchg %ax,%ax
After this patch, this is completely eliminated.
Based on a patch by Sean Christopherson <[email protected]>
Link: https://lore.kernel.org/kvm/[email protected]/
Cc: Sean Christopherson <[email protected]>
Cc: Rick Edgecombe <[email protected]>
Signed-off-by: Vishal Verma <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'rust/helpers/mutex.c')
0 files changed, 0 insertions, 0 deletions
