[PATCH][kvm-unit-test VMX]: Use #define for bit# 1 in GUEST_RFLAGS

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

 



Signed-off-by: Krish Sadhukhan <krish.sadhukhan@xxxxxxxxxx>
Reviewed-by: Mark Kanda <mark.kanda@xxxxxxxxxx>

---
 x86/vmx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/x86/vmx.c b/x86/vmx.c
index 6ba56bc..d1a0da8 100644
--- a/x86/vmx.c
+++ b/x86/vmx.c
@@ -1193,7 +1193,7 @@ static void init_vmcs_guest(void)
 	/* 26.3.1.4 */
 	vmcs_write(GUEST_RIP, (u64)(&guest_entry));
 	vmcs_write(GUEST_RSP, (u64)(guest_stack + PAGE_SIZE - 1));
-	vmcs_write(GUEST_RFLAGS, 0x2);
+	vmcs_write(GUEST_RFLAGS, X86_EFLAGS_FIXED);
 
 	/* 26.3.1.5 */
 	vmcs_write(GUEST_ACTV_STATE, ACTV_ACTIVE);
@@ -1705,7 +1705,7 @@ static int test_run(struct vmx_test *test)
 	test->exits = 0;
 	current = test;
 	regs = test->guest_regs;
-	vmcs_write(GUEST_RFLAGS, regs.rflags | 0x2);
+	vmcs_write(GUEST_RFLAGS, regs.rflags | X86_EFLAGS_FIXED);
 	launched = 0;
 	guest_finished = 0;
 	printf("\nTest suite: %s\n", test->name);
-- 
2.17.2




[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