Commit 096691e0 authored by Michal Luczaj's avatar Michal Luczaj Committed by Sean Christopherson
Browse files

KVM: x86/emulator: Fix comment in __load_segment_descriptor()



The comment refers to the same condition twice. Make it reflect what the
code actually does.

No functional change intended.

Signed-off-by: default avatarMichal Luczaj <mhal@rbox.co>
Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20230126013405.2967156-3-mhal@rbox.co


Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent 0735d1c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1634,7 +1634,7 @@ static int __load_segment_descriptor(struct x86_emulate_ctxt *ctxt,
	case VCPU_SREG_SS:
		/*
		 * segment is not a writable data segment or segment
		 * selector's RPL != CPL or segment selector's RPL != CPL
		 * selector's RPL != CPL or DPL != CPL
		 */
		if (rpl != cpl || (seg_desc.type & 0xa) != 0x2 || dpl != cpl)
			goto exception;