KVM: x86/emulator: Fix comment in __load_segment_descriptor()
authorMichal Luczaj <mhal@rbox.co>
Thu, 26 Jan 2023 01:34:04 +0000 (02:34 +0100)
committerSean Christopherson <seanjc@google.com>
Fri, 3 Feb 2023 21:34:02 +0000 (13:34 -0800)
The comment refers to the same condition twice. Make it reflect what the
code actually does.

No functional change intended.

Signed-off-by: Michal Luczaj <mhal@rbox.co>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20230126013405.2967156-3-mhal@rbox.co
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/emulate.c

index 43df65ef5c29b341155fe29555f6e1494179c79f..a630c5db971ce0f9ca4029ffc115786a2394a00d 100644 (file)
@@ -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;