summaryrefslogtreecommitdiffstats
path: root/crypto/ecdsa.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2022-06-08 22:45:13 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2022-06-20 11:50:57 -0400
commit3b23054cd3f5106aed31ccf71a7bc14518a768eb (patch)
treef01660b845b89860aa72af2bdb5bcb25f28e5f47 /crypto/ecdsa.c
parentbfbcc81bb82cbbad8bf4e40cea274f42b50674e2 (diff)
downloadlinux-3b23054cd3f5106aed31ccf71a7bc14518a768eb.tar.bz2
KVM: selftests: Add x86-64 support for exception fixup
Add x86-64 support for exception fixup on single instructions, without forcing tests to install their own fault handlers. Use registers r9-r11 to flag the instruction as "safe" and pass fixup/vector information, i.e. introduce yet another flavor of fixup (versus the kernel's in-memory tables and KUT's per-CPU area) to take advantage of KVM sefltests being 64-bit only. Using only registers avoids the need to allocate fixup tables, ensure FS or GS base is valid for the guest, ensure memory is mapped into the guest, etc..., and also reduces the potential for recursive faults due to accessing memory. Providing exception fixup trivializes tests that just want to verify that an instruction faults, e.g. no need to track start/end using global labels, no need to install a dedicated handler, etc... Deliberately do not support #DE in exception fixup so that the fixup glue doesn't need to account for a fault with vector == 0, i.e. the vector can also indicate that a fault occurred. KVM injects #DE only for esoteric emulation scenarios, i.e. there's very, very little value in testing #DE. Force any test that wants to generate #DEs to install its own handler(s). Use kvm_pv_test as a guinea pig for the new fixup, as it has a very straightforward use case of wanting to verify that RDMSR and WRMSR fault. Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20220608224516.3788274-3-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'crypto/ecdsa.c')
0 files changed, 0 insertions, 0 deletions