summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/emulate.c
diff options
context:
space:
mode:
authorMichal Luczaj <mhal@rbox.co>2023-01-26 02:34:04 +0100
committerSean Christopherson <seanjc@google.com>2023-02-03 22:34:02 +0100
commit096691e0d2a1a97ce5a0d68cffdc84ce97bce304 (patch)
treea49d56b5394666dfa0dfc85aab6956032d96afd9 /arch/x86/kvm/emulate.c
parentKVM: x86/emulator: Fix segment load privilege level validation (diff)
downloadlinux-096691e0d2a1a97ce5a0d68cffdc84ce97bce304.tar.xz
linux-096691e0d2a1a97ce5a0d68cffdc84ce97bce304.zip
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: 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>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r--arch/x86/kvm/emulate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 43df65ef5c29..a630c5db971c 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -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;