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: Keir Fraser <keir@xen.org>
Subject: Re: [PATCH] x86emul: tighten CLFLUSH emulation
Date: Mon, 12 Jan 2015 11:04:42 +0000	[thread overview]
Message-ID: <54B3AA4A.50706@citrix.com> (raw)
In-Reply-To: <54B3927D020000780005374A@mail.emea.novell.com>


[-- Attachment #1.1: Type: text/plain, Size: 1216 bytes --]

On 12/01/15 08:23, Jan Beulich wrote:
> While for us it's not as bad as it was for Linux, their commit
> 13e457e0ee ("KVM: x86: Emulator does not decode clflush well", by
> Nadav Amit <namit@cs.technion.ac.il>) nevertheless points out two
> shortcomings in our code: opcode 0F AE /7 is clflush only when it uses
> a memory mode (otherwise it's SFENCE) and when there's no REP prefix
> (an operand size prefix is fine, as that's CLFLUSHOPT).
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

>
> --- a/xen/arch/x86/x86_emulate/x86_emulate.c
> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c
> @@ -4400,7 +4400,9 @@ x86_emulate(
>      case 0xae: /* Grp15 */
>          switch ( modrm_reg & 7 )
>          {
> -        case 7: /* clflush */
> +        case 7: /* clflush{,opt} */
> +            fail_if(modrm_mod == 3);
> +            fail_if(rep_prefix());
>              fail_if(ops->wbinvd == NULL);
>              if ( (rc = ops->wbinvd(ctxt)) != 0 )
>                  goto done;
>
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel


[-- Attachment #1.2: Type: text/html, Size: 2153 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

      reply	other threads:[~2015-01-12 11:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-12  8:23 [PATCH] x86emul: tighten CLFLUSH emulation Jan Beulich
2015-01-12 11:04 ` Andrew Cooper [this message]

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=54B3AA4A.50706@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --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.