diff options
| author | Yosry Ahmed <yosry@kernel.org> | 2026-03-16 20:27:24 +0000 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-04-03 16:08:00 -0700 |
| commit | c85aaff26d55920d783adac431a59ec738a35aef (patch) | |
| tree | 9dfe1ba69b0565294d35de5cdb75dd554d6efdc8 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 7212094baef5acabef1969d77781a6527c09d743 (diff) | |
KVM: SVM: Properly check RAX in the emulator for SVM instructions
Architecturally, VMRUN/VMLOAD/VMSAVE should generate a #GP if the
physical address in RAX is not supported. check_svme_pa() hardcodes this
to checking that bits 63-48 are not set. This is incorrect on HW
supporting 52 bits of physical address space. Additionally, the emulator
does not check if the address is not aligned, which should also result
in #GP.
Use page_address_valid() which properly checks alignment and the address
legality based on the guest's MAXPHYADDR. Plumb it through
x86_emulate_ops, similar to is_canonical_addr(), to avoid directly
accessing the vCPU object in emulator code.
Fixes: 01de8b09e606 ("KVM: SVM: Add intercept checks for SVM instructions")
Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Yosry Ahmed <yosry@kernel.org>
Link: https://patch.msgid.link/20260316202732.3164936-2-yosry@kernel.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
