diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-06-17 19:20:14 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-06-17 19:20:14 +0300 |
commit | 08a7c7772b4db0be06e3b27239147c0a36e2a507 (patch) | |
tree | af653cb85a263ac19334cdaa74ecd58f909c5cef /tools/testing/selftests/kvm/lib/x86_64/svm.c | |
parent | b13b04d9382113f787e21c9567a4022fef8697b9 (diff) | |
parent | 69119673bd50b176ded34032fadd41530fb5af21 (diff) |
Merge remote-tracking branch 'torvalds/master' into perf/urgent
To get some newer headers that got out of sync with the copies in tools/
so that we can try to have the tools/perf/ build clean for v5.8 with
fewer pull requests.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/lib/x86_64/svm.c')
-rw-r--r-- | tools/testing/selftests/kvm/lib/x86_64/svm.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/testing/selftests/kvm/lib/x86_64/svm.c b/tools/testing/selftests/kvm/lib/x86_64/svm.c index c42401068373..3a5c72ed2b79 100644 --- a/tools/testing/selftests/kvm/lib/x86_64/svm.c +++ b/tools/testing/selftests/kvm/lib/x86_64/svm.c @@ -148,14 +148,18 @@ void run_guest(struct vmcb *vmcb, uint64_t vmcb_gpa) : "r15", "memory"); } -void nested_svm_check_supported(void) +bool nested_svm_supported(void) { struct kvm_cpuid_entry2 *entry = kvm_get_supported_cpuid_entry(0x80000001); - if (!(entry->ecx & CPUID_SVM)) { + return entry->ecx & CPUID_SVM; +} + +void nested_svm_check_supported(void) +{ + if (!nested_svm_supported()) { print_skip("nested SVM not enabled"); exit(KSFT_SKIP); } } - |