Paolo Bonzini
1d2c6c9bd4
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 >
2020-04-21 09:13:13 -04:00
Wainer dos Santos Moschetta
909e0abaac
selftests: kvm: Add testcase for creating max number of memslots
...
This patch introduces test_add_max_memory_regions(), which checks
that a VM can have added memory slots up to the limit defined in
KVM_CAP_NR_MEMSLOTS. Then attempt to add one more slot to
verify it fails as expected.
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com >
Reviewed-by: Andrew Jones <drjones@redhat.com >
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com >
Message-Id: <20200410231707.7128-11-sean.j.christopherson@intel.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-04-15 12:08:47 -04:00
Sean Christopherson
5b4f758f45
KVM: selftests: Make set_memory_region_test common to all architectures
...
Make set_memory_region_test available on all architectures by wrapping
the bits that are x86-specific in ifdefs. A future testcase
to create the maximum number of memslots will be architecture
agnostic.
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com >
Message-Id: <20200410231707.7128-10-sean.j.christopherson@intel.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-04-15 12:08:47 -04:00