Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f13882d8 authored by Gleb Natapov's avatar Gleb Natapov Committed by Marcelo Tosatti
Browse files

KVM: VMX: Fix check guest state validity if a guest is in VM86 mode



If guest vcpu is in VM86 mode the vcpu state should be checked as if in
real mode.

Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent 26539bd0
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -3605,7 +3605,7 @@ static bool guest_state_valid(struct kvm_vcpu *vcpu)
		return true;
		return true;


	/* real mode guest state checks */
	/* real mode guest state checks */
	if (!is_protmode(vcpu)) {
	if (!is_protmode(vcpu) || (vmx_get_rflags(vcpu) & X86_EFLAGS_VM)) {
		if (!rmode_segment_valid(vcpu, VCPU_SREG_CS))
		if (!rmode_segment_valid(vcpu, VCPU_SREG_CS))
			return false;
			return false;
		if (!rmode_segment_valid(vcpu, VCPU_SREG_SS))
		if (!rmode_segment_valid(vcpu, VCPU_SREG_SS))