File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 2
2
#ifndef __KVM_X86_VMX_RUN_FLAGS_H
3
3
#define __KVM_X86_VMX_RUN_FLAGS_H
4
4
5
- #define VMX_RUN_VMRESUME (1 << 0)
6
- #define VMX_RUN_SAVE_SPEC_CTRL (1 << 1)
5
+ #define VMX_RUN_VMRESUME_SHIFT 0
6
+ #define VMX_RUN_SAVE_SPEC_CTRL_SHIFT 1
7
+
8
+ #define VMX_RUN_VMRESUME BIT(VMX_RUN_VMRESUME_SHIFT)
9
+ #define VMX_RUN_SAVE_SPEC_CTRL BIT(VMX_RUN_SAVE_SPEC_CTRL_SHIFT)
7
10
8
11
#endif /* __KVM_X86_VMX_RUN_FLAGS_H */
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ SYM_FUNC_START(__vmx_vcpu_run)
139
139
mov (%_ASM_SP), %_ASM_AX
140
140
141
141
/* Check if vmlaunch or vmresume is needed */
142
- test $VMX_RUN_VMRESUME , %ebx
142
+ bt $VMX_RUN_VMRESUME_SHIFT , %ebx
143
143
144
144
/* Load guest registers. Don't clobber flags. */
145
145
mov VCPU_RCX(%_ASM_AX), %_ASM_CX
@@ -161,8 +161,8 @@ SYM_FUNC_START(__vmx_vcpu_run)
161
161
/* Load guest RAX. This kills the @regs pointer! */
162
162
mov VCPU_RAX(%_ASM_AX), %_ASM_AX
163
163
164
- /* Check EFLAGS.ZF from 'test VMX_RUN_VMRESUME' above */
165
- jz .Lvmlaunch
164
+ /* Check EFLAGS.CF from the VMX_RUN_VMRESUME bit test above. */
165
+ jnc .Lvmlaunch
166
166
167
167
/*
168
168
* After a successful VMRESUME/VMLAUNCH, control flow "magically"
You can’t perform that action at this time.
0 commit comments