Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1442803

Re: [RFC PATCH 3/4] KVM: x86: add support for emulating UMIP

From Radim Krčmář <rkrcmar@redhat.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 3/4] KVM: x86: add support for emulating UMIP
Date 2016-07-13 22:10 +0200
Message-ID <rUyDM-7RI-19@gated-at.bofh.it> (permalink)
References <rUbxw-Oh-21@gated-at.bofh.it> <rUbxw-Oh-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


2016-07-12 21:20+0200, Paolo Bonzini:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> @@ -3738,6 +3747,10 @@ static int em_lidt(struct x86_emulate_ctxt *ctxt)
>  
>  static int em_smsw(struct x86_emulate_ctxt *ctxt)
>  {
> +	if ((ctxt->ops->get_cr(ctxt, 4) & X86_CR4_UMIP) &&
> +	    ctxt->ops->cpl(ctxt) > 0)

UMIP should #GP(0) in virtual-8086 mode too (for SMSW, SIDT, and SGDT),
but cpl() returns 0 in vm86.

> +		return emulate_gp(ctxt, 0);

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH 3/4] KVM: x86: add support for emulating UMIP Paolo Bonzini <pbonzini@redhat.com> - 2016-07-12 21:30 +0200
  Re: [RFC PATCH 3/4] KVM: x86: add support for emulating UMIP Radim Krčmář <rkrcmar@redhat.com> - 2016-07-13 22:10 +0200
    Re: [RFC PATCH 3/4] KVM: x86: add support for emulating UMIP Paolo Bonzini <pbonzini@redhat.com> - 2016-07-14 09:10 +0200
      Re: [RFC PATCH 3/4] KVM: x86: add support for emulating UMIP Radim Krčmář <rkrcmar@redhat.com> - 2016-07-14 14:30 +0200

csiph-web