summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/x86_64/amx_test.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-01-26 07:44:34 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2022-01-26 12:45:20 -0500
commitdd4516aee365fc9c944c9d6036b6b87363398680 (patch)
treed37ff3074a20ea11c0c0d2b78167d5ee8cfaeb56 /tools/testing/selftests/kvm/x86_64/amx_test.c
parent05a9e065059e566f218f8778c4d17ee75db56c55 (diff)
selftests: kvm: move vm_xsave_req_perm call to amx_test
There is no need for tests other than amx_test to enable dynamic xsave states. Remove the call to vm_xsave_req_perm from generic code, and move it inside the test. While at it, allow customizing the bit that is requested, so that future tests can use it differently. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/x86_64/amx_test.c')
-rw-r--r--tools/testing/selftests/kvm/x86_64/amx_test.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/x86_64/amx_test.c b/tools/testing/selftests/kvm/x86_64/amx_test.c
index 523c1e99ed64..52a3ef6629e8 100644
--- a/tools/testing/selftests/kvm/x86_64/amx_test.c
+++ b/tools/testing/selftests/kvm/x86_64/amx_test.c
@@ -329,6 +329,8 @@ int main(int argc, char *argv[])
u32 amx_offset;
int stage, ret;
+ vm_xsave_req_perm(XSTATE_XTILE_DATA_BIT);
+
/* Create VM */
vm = vm_create_default(VCPU_ID, 0, guest_code);