[PATCH kvm-unit-tests 3/9] x86: nVMX: Introduce skip_exit_insn()

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

 



Signed-off-by: Liran Alon <liran.alon@xxxxxxxxxx>
Signed-off-by: Jim Mattson <jmattson@xxxxxxxxxx>
---
 x86/vmx_tests.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index 0ce6ad55c425..0a3464f87526 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
@@ -2102,13 +2102,17 @@ static void assert_exit_reason(u64 expected)
 			   exit_reason_description(actual));
 }
 
-static void skip_exit_vmcall()
+static void skip_exit_insn()
 {
 	u64 guest_rip = vmcs_read(GUEST_RIP);
 	u32 insn_len = vmcs_read(EXI_INST_LEN);
+	vmcs_write(GUEST_RIP, guest_rip + insn_len);
+}
 
+static void skip_exit_vmcall()
+{
 	assert_exit_reason(VMX_VMCALL);
-	vmcs_write(GUEST_RIP, guest_rip + insn_len);
+	skip_exit_insn();
 }
 
 static void v2_null_test_guest(void)
-- 
1.9.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