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

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

KVM: VMX: reset CPL only on CS register write.

parent 1f3141e8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3269,6 +3269,7 @@ static void vmx_set_segment(struct kvm_vcpu *vcpu,
	const struct kvm_vmx_segment_field *sf = &kvm_vmx_segment_fields[seg];

	vmx_segment_cache_clear(vmx);
	if (seg == VCPU_SREG_CS)
		__clear_bit(VCPU_EXREG_CPL, (ulong *)&vcpu->arch.regs_avail);

	if (vmx->rmode.vm86_active && seg != VCPU_SREG_LDTR) {