All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Cc: Wei Liu <wei.liu2@citrix.com>
Subject: Re: [PATCH 2/3] x86emul: raise #GP(0) in VME mode for POPF with TF set in new value
Date: Fri, 2 Nov 2018 18:14:24 +0000	[thread overview]
Message-ID: <44156271-6b5a-fd35-bb9c-c30a0e158c36@citrix.com> (raw)
In-Reply-To: <5BDC7F3002000078001F75CF@prv1-mh.provo.novell.com>

On 02/11/18 16:45, Jan Beulich wrote:
> This is a check explicitly listed by the instruction page in the SDM.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Hmm - looking at the listing, I think we've got an IOPL mismatch.  This
behaviour, as well as the VIP adjustment in context, only apply at IOPL < 3.

~Andrew

>
> --- a/xen/arch/x86/x86_emulate/x86_emulate.c
> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c
> @@ -4049,6 +4049,7 @@ x86_emulate(
>              dst.val = (uint16_t)dst.val | (_regs.eflags & 0xffff0000u);
>              if ( cr4 & X86_CR4_VME )
>              {
> +                generate_exception_if(dst.val & X86_EFLAGS_TF, EXC_GP, 0);
>                  if ( dst.val & X86_EFLAGS_IF )
>                  {
>                      generate_exception_if(_regs.eflags & X86_EFLAGS_VIP,
>
>


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-11-02 18:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-02 16:42 [PATCH 0/3] x86emul: VME/PVI mode fixes Jan Beulich
2018-11-02 16:45 ` [PATCH 1/3] x86emul: VME and PVI modes require a #GP(0) check first thing Jan Beulich
2018-11-02 18:04   ` Andrew Cooper
2018-11-02 16:45 ` [PATCH 2/3] x86emul: raise #GP(0) in VME mode for POPF with TF set in new value Jan Beulich
2018-11-02 18:14   ` Andrew Cooper [this message]
2018-11-05  9:47     ` Jan Beulich
2018-11-02 16:46 ` [PATCH 3/3] x86emul: consolidate CR4 handling Jan Beulich
2018-11-02 18:24   ` Andrew Cooper
2018-11-05  9:55     ` Jan Beulich
2018-11-06 13:33 ` [PATCH v2 0/3] x86emul: VME/PVI mode fixes Jan Beulich
2018-11-06 13:44   ` [PATCH v2 1/3] x86emul: skip VIF processing in VME mode for 16-bit POPF at IOPL 3 Jan Beulich
2018-12-03 19:23     ` Andrew Cooper
2018-11-06 13:45   ` [PATCH v2 2/3] x86emul: raise #GP(0) in VME mode for POPF with TF set in new value Jan Beulich
2018-12-03 19:24     ` Andrew Cooper
2018-11-06 13:45   ` [PATCH v2 3/3] x86emul: consolidate CR4 handling Jan Beulich
2018-12-03 19:37     ` Andrew Cooper
2018-12-04  9:54       ` Jan Beulich
2018-11-06 14:21   ` [PATCH v2 0/3] x86emul: VME/PVI mode fixes Andrew Cooper
2018-11-06 14:48     ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44156271-6b5a-fd35-bb9c-c30a0e158c36@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.