[kvm-unit-tests PATCH 06/10] nVMX: Check the results of VMXON/VMXOFF in feature control test

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

 



Assert that VMXON and VMXOFF succeed in the feature control test.
Despite a lack of "safe" or underscores, vmx_on() and vmx_off() do not
guarantee success.

Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
---
 x86/vmx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/x86/vmx.c b/x86/vmx.c
index 65305238..8475bf3b 100644
--- a/x86/vmx.c
+++ b/x86/vmx.c
@@ -1401,8 +1401,8 @@ static void init_bsp_vmx(void)
 
 static void do_vmxon_off(void *data)
 {
-	vmx_on();
-	vmx_off();
+	TEST_ASSERT(!vmx_on());
+	TEST_ASSERT(!vmx_off());
 }
 
 static void do_write_feature_control(void *data)
-- 
2.36.1.255.ge46751e96f-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