aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index fad871cbed1..2e894954069 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1845,7 +1845,7 @@ static void vmx_get_segment(struct kvm_vcpu *vcpu,
1845 1845
1846static int vmx_get_cpl(struct kvm_vcpu *vcpu) 1846static int vmx_get_cpl(struct kvm_vcpu *vcpu)
1847{ 1847{
1848 if (!kvm_read_cr0_bits(vcpu, X86_CR0_PE)) /* if real mode */ 1848 if (!is_protmode(vcpu))
1849 return 0; 1849 return 0;
1850 1850
1851 if (vmx_get_rflags(vcpu) & X86_EFLAGS_VM) /* if virtual 8086 */ 1851 if (vmx_get_rflags(vcpu) & X86_EFLAGS_VM) /* if virtual 8086 */
@@ -2100,7 +2100,7 @@ static bool cs_ss_rpl_check(struct kvm_vcpu *vcpu)
2100static bool guest_state_valid(struct kvm_vcpu *vcpu) 2100static bool guest_state_valid(struct kvm_vcpu *vcpu)
2101{ 2101{
2102 /* real mode guest state checks */ 2102 /* real mode guest state checks */
2103 if (!kvm_read_cr0_bits(vcpu, X86_CR0_PE)) { 2103 if (!is_protmode(vcpu)) {
2104 if (!rmode_segment_valid(vcpu, VCPU_SREG_CS)) 2104 if (!rmode_segment_valid(vcpu, VCPU_SREG_CS))
2105 return false; 2105 return false;
2106 if (!rmode_segment_valid(vcpu, VCPU_SREG_SS)) 2106 if (!rmode_segment_valid(vcpu, VCPU_SREG_SS))