Revision tags: v6.6.25, v6.6.24, v6.6.23, v6.6.16, v6.6.15, v6.6.14, v6.6.13, v6.6.12, v6.6.11, v6.6.10, v6.6.9, v6.6.8, v6.6.7, v6.6.6, v6.6.5, v6.6.4, v6.6.3, v6.6.2, v6.5.11, v6.6.1, v6.5.10, v6.6, v6.5.9, v6.5.8, v6.5.7, v6.5.6, v6.5.5, v6.5.4, v6.5.3, v6.5.2, v6.1.51, v6.5.1, v6.1.50, v6.5, v6.1.49, v6.1.48, v6.1.46, v6.1.45, v6.1.44, v6.1.43 |
|
#
7ce7f8e7 |
| 28-Jul-2023 |
Sean Christopherson <seanjc@google.com> |
KVM: selftests: Rip out old, param-based guest assert macros
Drop the param-based guest assert macros and enable the printf versions for all selftests. Note! This change can affect tests even if t
KVM: selftests: Rip out old, param-based guest assert macros
Drop the param-based guest assert macros and enable the printf versions for all selftests. Note! This change can affect tests even if they don't use directly use guest asserts! E.g. via library code, or due to the compiler making different optimization decisions.
Link: https://lore.kernel.org/r/20230729003643.1053367-33-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
show more ...
|
#
a925f799 |
| 28-Jul-2023 |
Sean Christopherson <seanjc@google.com> |
KVM: selftests: Convert the nSVM software interrupt test to printf guest asserts
Convert x86's nested SVM software interrupt injection test to use printf- based guest asserts. Opportunistically use
KVM: selftests: Convert the nSVM software interrupt test to printf guest asserts
Convert x86's nested SVM software interrupt injection test to use printf- based guest asserts. Opportunistically use GUEST_ASSERT() and GUEST_FAIL() in a few locations to spit out more debug information.
Link: https://lore.kernel.org/r/20230729003643.1053367-28-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
show more ...
|
Revision tags: v6.1.42, v6.1.41, v6.1.40, v6.1.39, v6.1.38, v6.1.37, v6.1.36, v6.4, v6.1.35, v6.1.34, v6.1.33, v6.1.32, v6.1.31, v6.1.30, v6.1.29, v6.1.28, v6.1.27, v6.1.26, v6.3, v6.1.25, v6.1.24, v6.1.23, v6.1.22, v6.1.21, v6.1.20, v6.1.19, v6.1.18, v6.1.17, v6.1.16, v6.1.15, v6.1.14, v6.1.13, v6.2, v6.1.12, v6.1.11, v6.1.10 |
|
#
c96f57b0 |
| 03-Feb-2023 |
Vipin Sharma <vipinsh@google.com> |
KVM: selftests: Make vCPU exit reason test assertion common
Make TEST_ASSERT_KVM_EXIT_REASON() macro and replace all exit reason test assert statements with it.
No functional changes intended.
Sig
KVM: selftests: Make vCPU exit reason test assertion common
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>
show more ...
|
Revision tags: v6.1.9, v6.1.8, v6.1.7, v6.1.6, v6.1.5, v6.0.19, v6.0.18, v6.1.4, v6.1.3, v6.0.17, v6.1.2, v6.0.16, v6.1.1, v6.0.15, v6.0.14, v6.0.13, v6.1, v6.0.12, v6.0.11 |
|
#
129c48cd |
| 30-Nov-2022 |
Paolo Bonzini <pbonzini@redhat.com> |
KVM: selftests: restore special vmmcall code layout needed by the harness
Commit 8fda37cf3d41 ("KVM: selftests: Stuff RAX/RCX with 'safe' values in vmmcall()/vmcall()", 2022-11-21) broke the svm_nes
KVM: selftests: restore special vmmcall code layout needed by the harness
Commit 8fda37cf3d41 ("KVM: selftests: Stuff RAX/RCX with 'safe' values in vmmcall()/vmcall()", 2022-11-21) broke the svm_nested_soft_inject_test because it placed a "pop rbp" instruction after vmmcall. While this is correct and mimics what is done in the VMX case, this particular test expects a ud2 instruction right after the vmmcall, so that it can skip over it in the L1 part of the test.
Inline a suitably-modified version of vmmcall() to restore the functionality of the test.
Fixes: 8fda37cf3d41 ("KVM: selftests: Stuff RAX/RCX with 'safe' values in vmmcall()/vmcall()" Cc: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Sean Christopherson <seanjc@google.com> Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20221130181147.9911-1-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
Revision tags: v6.0.10, v5.15.80, v6.0.9, v5.15.79 |
|
#
197ebb71 |
| 15-Nov-2022 |
Vishal Annapurve <vannapurve@google.com> |
KVM: selftests: move common startup logic to kvm_util.c
Consolidate common startup logic in one place by implementing a single setup function with __attribute((constructor)) for all selftests within
KVM: selftests: move common startup logic to kvm_util.c
Consolidate common startup logic in one place by implementing a single setup function with __attribute((constructor)) for all selftests within kvm_util.c.
This allows moving logic like: /* Tell stdout not to buffer its content */ setbuf(stdout, NULL); to a single file for all selftests.
This will also allow any required setup at entry in future to be done in common main function.
Link: https://lore.kernel.org/lkml/Ywa9T+jKUpaHLu%2Fl@google.com Suggested-by: Sean Christopherson <seanjc@google.com> Reviewed-by: Andrew Jones <andrew.jones@linux.dev> Reviewed-by: Peter Gonda <pgonda@google.com> Signed-off-by: Vishal Annapurve <vannapurve@google.com> Link: https://lore.kernel.org/r/20221115213845.3348210-2-vannapurve@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
show more ...
|
Revision tags: v6.0.8, v5.15.78, v6.0.7, v5.15.77, v5.15.76, v6.0.6, v6.0.5, v5.15.75, v6.0.4, v6.0.3, v6.0.2, v5.15.74, v5.15.73, v6.0.1, v5.15.72, v6.0, v5.15.71, v5.15.70, v5.15.69, v5.15.68, v5.15.67, v5.15.66, v5.15.65, v5.15.64, v5.15.63, v5.15.62, v5.15.61, v5.15.60, v5.15.59, v5.19, v5.15.58, v5.15.57, v5.15.56, v5.15.55, v5.15.54, v5.15.53, v5.15.52, v5.15.51, v5.15.50, v5.15.49, v5.15.48 |
|
#
3c67f820 |
| 14-Jun-2022 |
Sean Christopherson <seanjc@google.com> |
KVM: selftests: Use kvm_cpu_has() for nSVM soft INT injection test
Use kvm_cpu_has() to query for NRIPS support instead of open coding equivalent functionality using kvm_get_supported_cpuid_entry().
KVM: selftests: Use kvm_cpu_has() for nSVM soft INT injection test
Use kvm_cpu_has() to query for NRIPS support instead of open coding equivalent functionality using kvm_get_supported_cpuid_entry().
Signed-off-by: Sean Christopherson <seanjc@google.com> Link: https://lore.kernel.org/r/20220614200707.3315957-16-seanjc@google.com
show more ...
|
#
f21940a3 |
| 14-Jun-2022 |
Sean Christopherson <seanjc@google.com> |
KVM: selftests: Use kvm_cpu_has() for nested SVM checks
Use kvm_cpu_has() to check for nested SVM support, and drop the helpers now that their functionality is trivial to implement.
No functional c
KVM: selftests: Use kvm_cpu_has() for nested SVM checks
Use kvm_cpu_has() to check for nested SVM support, and drop the helpers now that their functionality is trivial to implement.
No functional change intended.
Signed-off-by: Sean Christopherson <seanjc@google.com> Link: https://lore.kernel.org/r/20220614200707.3315957-6-seanjc@google.com
show more ...
|
#
683edfd4 |
| 14-Jun-2022 |
Sean Christopherson <seanjc@google.com> |
KVM: sefltests: Use CPUID_* instead of X86_FEATURE_* for one-off usage
Rename X86_FEATURE_* macros to CPUID_* in various tests to free up the X86_FEATURE_* names for KVM-Unit-Tests style CPUID autom
KVM: sefltests: Use CPUID_* instead of X86_FEATURE_* for one-off usage
Rename X86_FEATURE_* macros to CPUID_* in various tests to free up the X86_FEATURE_* names for KVM-Unit-Tests style CPUID automagic where the function, leaf, register, and bit for the feature is embedded in its macro value.
No functional change intended.
Signed-off-by: Sean Christopherson <seanjc@google.com> Link: https://lore.kernel.org/r/20220614200707.3315957-3-seanjc@google.com
show more ...
|
#
594a1c27 |
| 15-Jun-2022 |
Colton Lewis <coltonlewis@google.com> |
KVM: selftests: Fix filename reporting in guest asserts
Fix filename reporting in guest asserts by ensuring the GUEST_ASSERT macro records __FILE__ and substituting REPORT_GUEST_ASSERT for many repe
KVM: selftests: Fix filename reporting in guest asserts
Fix filename reporting in guest asserts by ensuring the GUEST_ASSERT macro records __FILE__ and substituting REPORT_GUEST_ASSERT for many repetitive calls to TEST_FAIL.
Previously filename was reported by using __FILE__ directly in the selftest, wrongly assuming it would always be the same as where the assertion failed.
Signed-off-by: Colton Lewis <coltonlewis@google.com> Reported-by: Ricardo Koller <ricarkol@google.com> Fixes: 4e18bccc2e5544f0be28fc1c4e6be47a469d6c60 Link: https://lore.kernel.org/r/20220615193116.806312-5-coltonlewis@google.com [sean: convert more TEST_FAIL => REPORT_GUEST_ASSERT instances] Signed-off-by: Sean Christopherson <seanjc@google.com>
show more ...
|
Revision tags: v5.15.47, v5.15.46, v5.15.45 |
|
#
768e9a61 |
| 02-Jun-2022 |
Sean Christopherson <seanjc@google.com> |
KVM: selftests: Purge vm+vcpu_id == vcpu silliness
Take a vCPU directly instead of a VM+vcpu pair in all vCPU-scoped helpers and ioctls.
Signed-off-by: Sean Christopherson <seanjc@google.com> Signe
KVM: selftests: Purge vm+vcpu_id == vcpu silliness
Take a vCPU directly instead of a VM+vcpu pair in all vCPU-scoped helpers and ioctls.
Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
08ce0888 |
| 01-Jun-2022 |
Sean Christopherson <seanjc@google.com> |
KVM: selftests: Convert svm_nested_soft_inject_test away from VCPU_ID
Convert svm_nested_soft_inject_test to use vm_create_with_one_vcpu() and pull the vCPU's ID from 'struct kvm_vcpu'.
Signed-off-
KVM: selftests: Convert svm_nested_soft_inject_test away from VCPU_ID
Convert svm_nested_soft_inject_test to use vm_create_with_one_vcpu() and pull the vCPU's ID from 'struct kvm_vcpu'.
Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
877bd399 |
| 02-Jun-2022 |
Sean Christopherson <seanjc@google.com> |
KVM: selftests: Rename MP_STATE and GUEST_DEBUG helpers for consistency
Move the get/set part of the MP_STATE and GUEST_DEBUG helpers to the end to align with the many other ioctl() wrappers/helpers
KVM: selftests: Rename MP_STATE and GUEST_DEBUG helpers for consistency
Move the get/set part of the MP_STATE and GUEST_DEBUG helpers to the end to align with the many other ioctl() wrappers/helpers. Note, this is not an endorsement of the predominant style, the goal is purely to provide consistency in the selftests.
Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
Revision tags: v5.15.44, v5.15.43, v5.15.42, v5.18, v5.15.41, v5.15.40, v5.15.39, v5.15.38, v5.15.37, v5.15.36, v5.15.35, v5.15.34, v5.15.33, v5.15.32, v5.15.31, v5.17, v5.15.30, v5.15.29, v5.15.28, v5.15.27, v5.15.26, v5.15.25, v5.15.24 |
|
#
b530eba1 |
| 15-Feb-2022 |
Sean Christopherson <seanjc@google.com> |
KVM: selftests: Get rid of kvm_util_internal.h
Fold kvm_util_internal.h into kvm_util_base.h, i.e. make all KVM utility stuff "public". Hiding struct implementations from tests has been a massive f
KVM: selftests: Get rid of kvm_util_internal.h
Fold kvm_util_internal.h into kvm_util_base.h, i.e. make all KVM utility stuff "public". Hiding struct implementations from tests has been a massive failure, as it has led to pointless and poorly named wrappers, unnecessarily opaque code, etc...
Not to mention that the approach was a complete failure as evidenced by the non-zero number of tests that were including kvm_util_internal.h.
Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
d8969871 |
| 01-May-2022 |
Maciej S. Szmigiero <maciej.szmigiero@oracle.com> |
KVM: selftests: nSVM: Add svm_nested_soft_inject_test
Add a KVM self-test that checks whether a nSVM L1 is able to successfully inject a software interrupt, a soft exception and a NMI into its L2 gu
KVM: selftests: nSVM: Add svm_nested_soft_inject_test
Add a KVM self-test that checks whether a nSVM L1 is able to successfully inject a software interrupt, a soft exception and a NMI into its L2 guest.
In practice, this tests both the next_rip field consistency and L1-injected event with intervening L0 VMEXIT during its delivery: the first nested VMRUN (that's also trying to inject a software interrupt) will immediately trigger a L0 NPF. This L0 NPF will have zero in its CPU-returned next_rip field, which if incorrectly reused by KVM will trigger a #PF when trying to return to such address 0 from the interrupt handler.
For NMI injection this tests whether the L1 NMI state isn't getting incorrectly mixed with the L2 NMI state if a L1 -> L2 NMI needs to be re-injected.
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> [sean: check exact L2 RIP on first soft interrupt] Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com> Message-Id: <d5f3d56528558ad8e28a9f1e1e4187f5a1e6770a.1651440202.git.maciej.szmigiero@oracle.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|