]> Gentwo Git Trees - linux/.git/commit
KVM: selftests: Add support for #DE exception fixup
authorSean Christopherson <seanjc@google.com>
Tue, 9 Sep 2025 20:28:32 +0000 (13:28 -0700)
committerSean Christopherson <seanjc@google.com>
Thu, 11 Sep 2025 15:55:44 +0000 (08:55 -0700)
commit7b39b6c76942d42d3eecf0844d0f6a76fb64e805
tree02848e18d09665cc7774eac54de5339b3da99f35
parent665071186ce4af9f83a5d78bcb7a2a3a6b3ecfe7
KVM: selftests: Add support for #DE exception fixup

Add support for handling #DE (divide error) exceptions in KVM selftests
so that the fastops test can verify KVM correctly handles #DE when
emulating DIV or IDIV on behalf of the guest.  Morph #DE to 0xff (i.e.
to -1) as a mostly-arbitrary vector to indicate #DE, so that '0' (the
real #DE vector) can still be used to indicate "no exception".

Link: https://lore.kernel.org/r/20250909202835.333554-2-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/include/x86/processor.h
tools/testing/selftests/kvm/lib/x86/processor.c