[PATCH kvm-unit-tests] svm: Updated cr4 in test_efer to fix report msg

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

 



Updated cr4 so that cr4 and vmcb->save.cr4 are the same
and the report statement prints out the correct cr4.
Moved it to the correct test.

Signed-off-by: Lara Lazier <laramglazier@xxxxxxxxx>
---
 x86/svm_tests.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/x86/svm_tests.c b/x86/svm_tests.c
index 8387bea..080a1a8 100644
--- a/x86/svm_tests.c
+++ b/x86/svm_tests.c
@@ -2252,7 +2252,6 @@ static void test_efer(void)
 	/*
 	 * EFER.LME and CR0.PG are both set and CR0.PE is zero.
 	 */
-	vmcb->save.cr4 = cr4_saved | X86_CR4_PAE;
 	cr0 &= ~X86_CR0_PE;
 	vmcb->save.cr0 = cr0;
 	report(svm_vmrun() == SVM_EXIT_ERR, "EFER.LME=1 (%lx), "
@@ -2266,6 +2265,8 @@ static void test_efer(void)
 
 	cr0 |= X86_CR0_PE;
 	vmcb->save.cr0 = cr0;
+    cr4 = cr4_saved | X86_CR4_PAE;
+    vmcb->save.cr4 = cr4;
 	cs_attrib = cs_attrib_saved | SVM_SELECTOR_L_MASK |
 	    SVM_SELECTOR_DB_MASK;
 	vmcb->save.cs.attrib = cs_attrib;
-- 
2.25.1




[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