diff options
author | Sean Christopherson <seanjc@google.com> | 2022-09-29 02:36:49 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-09-30 13:39:32 +0300 |
commit | fca6d06cd164c6c3029be6323ed06020fca0d933 (patch) | |
tree | 1e36e0d6500b2feacd0e7768b2b910f537a5d88b /tools/perf/scripts/python/stackcollapse.py | |
parent | 04f2f60befc9af274c1790e626cc79334b1f4489 (diff) | |
download | linux-fca6d06cd164c6c3029be6323ed06020fca0d933.tar.xz |
KVM: selftests: Hardcode VMCALL/VMMCALL opcodes in "fix hypercall" test
Hardcode the VMCALL/VMMCALL opcodes in dedicated arrays instead of
extracting the opcodes from inline asm, and patch in the "other" opcode
so as to preserve the original opcode, i.e. the opcode that the test
executes in the guest.
Preserving the original opcode (by not patching the source), will make
it easier to implement a check that KVM doesn't modify the opcode (the
test currently only verifies that a #UD occurred).
Use INT3 (0xcc) as the placeholder so that the guest will likely die a
horrible death if the test's patching goes awry.
As a bonus, patching from within the test dedups a decent chunk of code.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220928233652.783504-5-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions