selftests: kvm/set_memory_region_test: do not check RIP if the guest shuts down
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 17 Apr 2020 16:35:38 +0000 (12:35 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 21 Apr 2020 13:13:13 +0000 (09:13 -0400)
commit1d2c6c9bd4b768bb665eeeb793dd50c2cebcbf0c
treec2b33e7df64ed6afe7b93169032aed06c02fefb5
parente72436bc3a5206f95bb384e741154166ddb3202e
selftests: kvm/set_memory_region_test: do not check RIP if the guest shuts down

On AMD, the state of the VMCB is undefined after a shutdown VMEXIT.  KVM
takes a very conservative approach to that and resets the guest altogether
when that happens.  This causes the set_memory_region_test to fail
because the RIP is 0xfff0 (the reset vector).  Restrict the RIP test
to KVM_EXIT_INTERNAL_ERROR in order to fix this.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/set_memory_region_test.c