summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/x86_64/svm_nested_shutdown_test.c
AgeCommit message (Collapse)AuthorFilesLines
2024-04-29KVM: selftests: Init IDT and exception handlers for all VMs/vCPUs on x86Sean Christopherson1-3/+0
Initialize the IDT and exception handlers for all non-barebones VMs and vCPUs on x86. Forcing tests to manually configure the IDT just to save 8KiB of memory is a terrible tradeoff, and also leads to weird tests (multiple tests have deliberately relied on shutdown to indicate success), and hard-to-debug failures, e.g. instead of a precise unexpected exception failure, tests see only shutdown. Reviewed-by: Ackerley Tng <ackerleytng@google.com> Link: https://lore.kernel.org/r/20240314232637.2538648-11-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
2024-04-29KVM: selftests: Move GDT, IDT, and TSS fields to x86's kvm_vm_archSean Christopherson1-1/+1
Now that kvm_vm_arch exists, move the GDT, IDT, and TSS fields to x86's implementation, as the structures are firmly x86-only. Reviewed-by: Ackerley Tng <ackerleytng@google.com> Link: https://lore.kernel.org/r/20240314232637.2538648-4-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
2023-03-14KVM: selftests: Make vCPU exit reason test assertion commonVipin Sharma1-6/+1
Make TEST_ASSERT_KVM_EXIT_REASON() macro and replace all exit reason test assert statements with it. No functional changes intended. Signed-off-by: Vipin Sharma <vipinsh@google.com> Reviewed-by: David Matlack <dmatlack@google.com> Message-Id: <20230204014547.583711-2-vipinsh@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-11-17kvm: selftests: add svm nested shutdown testMaxim Levitsky1-0/+67
Add test that tests that on SVM if L1 doesn't intercept SHUTDOWN, then L2 crashes L1 and doesn't crash L2 Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20221103141351.50662-7-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>