diff options
| author | Sean Christopherson <seanjc@google.com> | 2026-09-03 17:24:19 -0700 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-09-11 09:08:16 -0700 |
| commit | 978c4df4b2458ec5a26bc6fe8c8ac57bfaf6c9db (patch) | |
| tree | 0af8085ab7c5876f30236174df713cd79d6f0390 /tools/perf/scripts/python/bin | |
| parent | 7763344704509dfe89a9394550ac85ba6f7f76f3 (diff) | |
KVM: selftests: Dedup assembly code for VMLAUNCH and VMRESUME
Dedup the assembly code for VMLAUNCH vs. VMRESUME, for both architectural
VMCS and eVMCS, as the difference is literally only the actual VM-Enter
instruction for VMLAUNCH vs. VMRESUME, and VMWRITE vs. MOV for VMCS vs.
eVMCS.
Opportunistically place the implementations in vmx.c so that the lengthy
sequence (~580 bytes of code) aren't inlined for every single VM-Enter.
000000000041b910 <__vmlaunch>:
41b910: 80 3d 61 5e 10 00 00 cmpb $0x0,0x105e61(%rip) # 521778 <enable_evmcs>
41b917: 0f 85 13 01 00 00 jne 41ba30 <__vmlaunch+0x120>
41b91d: ba 14 6c 00 00 mov $0x6c14,%edx
41b922: b9 16 6c 00 00 mov $0x6c16,%ecx
41b927: 6a 00 push $0x0
41b929: 0f 79 d4 vmwrite %rsp,%rdx
41b92c: 48 8d 05 82 00 00 00 lea 0x82(%rip),%rax # 41b9b5 <__vmlaunch+0xa5>
41b933: 0f 79 c8 vmwrite %rax,%rcx
<xchg GPRs>
41b9ae: 0f 01 c2 vmlaunch
41b9b1: 48 ff 04 24 incq (%rsp)
<xchg GPRs>
41ba2d: 58 pop %rax
41ba2e: c3 ret
41ba2f: 90 nop
41ba30: 48 8b 35 39 5d 10 00 mov 0x105d39(%rip),%rsi # 521770 <current_evmcs>
41ba37: c7 86 38 03 00 00 00 00 00 00 movl $0x0,0x338(%rsi)
41ba41: 6a 00 push $0x0
41ba43: 48 89 a6 68 02 00 00 mov %rsp,0x268(%rsi)
41ba4a: 48 8d 05 83 00 00 00 lea 0x83(%rip),%rax # 41bad4 <__vmlaunch+0x1c4>
41ba51: 48 89 46 50 mov %rax,0x50(%rsi)
<xchg GPRs>
41bacd: 0f 01 c2 vmlaunch
41bad0: 48 ff 04 24 incq (%rsp)
<xchg GPRs>
41bb4c: 58 pop %rax
41bb4d: c3 ret
No functional change intended (though the code generation will be quite
different).
Cc: Yosry Ahmed <yosry@kernel.org>
Link: https://patch.msgid.link/20260904002423.3154436-14-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
