[kvm-unit-tests PATCH v5 3/4] x86: Add a helper to allow tests to signal completion without a vmcall()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Putting a vmcall() at the end of a nested test isn't always convenient
to do, and isn't necessary.  Add a helper to allow the nested test
to make it possible to skip this requirement.

Signed-off-by: Aaron Lewis <aaronlewis@xxxxxxxxxx>
---
 x86/vmx.c | 5 +++++
 x86/vmx.h | 1 +
 2 files changed, 6 insertions(+)

diff --git a/x86/vmx.c b/x86/vmx.c
index b2d8393..51eed8c 100644
--- a/x86/vmx.c
+++ b/x86/vmx.c
@@ -1910,6 +1910,11 @@ void test_override_guest(test_guest_func func)
 	init_vmcs_guest();
 }
 
+void test_set_guest_finished(void)
+{
+	guest_finished = 1;
+}
+
 static void check_for_guest_termination(union exit_reason exit_reason)
 {
 	if (is_hypercall(exit_reason)) {
diff --git a/x86/vmx.h b/x86/vmx.h
index dabd5da..11cb665 100644
--- a/x86/vmx.h
+++ b/x86/vmx.h
@@ -1058,5 +1058,6 @@ void test_set_guest(test_guest_func func);
 void test_override_guest(test_guest_func func);
 void test_add_teardown(test_teardown_func func, void *data);
 void test_skip(const char *msg);
+void test_set_guest_finished(void);
 
 #endif
-- 
2.35.0.rc0.227.g00780c9af4-goog




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux