diff options
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/emulate.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 1317560d0823..d9461e47a65d 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -663,7 +663,6 @@ static __always_inline int __linearize(struct x86_emulate_ctxt *ctxt, | |||
663 | ulong la; | 663 | ulong la; |
664 | u32 lim; | 664 | u32 lim; |
665 | u16 sel; | 665 | u16 sel; |
666 | unsigned cpl; | ||
667 | 666 | ||
668 | la = seg_base(ctxt, addr.seg) + addr.ea; | 667 | la = seg_base(ctxt, addr.seg) + addr.ea; |
669 | *max_size = 0; | 668 | *max_size = 0; |
@@ -705,20 +704,6 @@ static __always_inline int __linearize(struct x86_emulate_ctxt *ctxt, | |||
705 | } | 704 | } |
706 | if (size > *max_size) | 705 | if (size > *max_size) |
707 | goto bad; | 706 | goto bad; |
708 | cpl = ctxt->ops->cpl(ctxt); | ||
709 | if (!fetch) { | ||
710 | /* data segment or readable code segment */ | ||
711 | if (cpl > desc.dpl) | ||
712 | goto bad; | ||
713 | } else if ((desc.type & 8) && !(desc.type & 4)) { | ||
714 | /* nonconforming code segment */ | ||
715 | if (cpl != desc.dpl) | ||
716 | goto bad; | ||
717 | } else if ((desc.type & 8) && (desc.type & 4)) { | ||
718 | /* conforming code segment */ | ||
719 | if (cpl < desc.dpl) | ||
720 | goto bad; | ||
721 | } | ||
722 | break; | 707 | break; |
723 | } | 708 | } |
724 | if (ctxt->mode != X86EMUL_MODE_PROT64) | 709 | if (ctxt->mode != X86EMUL_MODE_PROT64) |