All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] x86/emul: Calculate not_64bit during instruction decode
Date: Mon, 16 Jan 2017 05:50:37 -0700	[thread overview]
Message-ID: <587CCFAD0200007800130725@prv-mh.provo.novell.com> (raw)
In-Reply-To: <1484563769-14726-1-git-send-email-andrew.cooper3@citrix.com>

>>> On 16.01.17 at 11:49, <andrew.cooper3@citrix.com> wrote:
> ... rather than repeating "generate_exception_if(mode_64bit(), EXC_UD);" in
> the emulation switch statement.
> 
> Bloat-o-meter shows:
> 
>   add/remove: 0/0 grow/shrink: 1/2 up/down: 8/-495 (-487)
>   function                                     old     new   delta
>   per_cpu__state                                98     106      +8
>   x86_decode                                  6782    6726     -56
>   x86_emulate                                57160   56721    -439
> 
> The reason for x86_decode() getting smaller is that this change alters the
> x86_decode_onebyte() switch statement from a chain of if()/else's to a jump
> table.  The jump table adds 250 bytes of data which bloat-o-meter clearly
> can't see.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>

> I am also considering doing similar for vcpu cpuid checks, to split apart the
> logic deciding on the feature to check from the emulation logic.  This will
> simplify some of the larger blocks, especially the mov emulation.

Not sure about this one, specifically also in the context of the
SSEn/AVX support work I'm doing right now (where individual insn
variants have different CPUID dependencies).

Jan


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

      reply	other threads:[~2017-01-16 12:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16 10:49 [PATCH] x86/emul: Calculate not_64bit during instruction decode Andrew Cooper
2017-01-16 12:50 ` Jan Beulich [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=587CCFAD0200007800130725@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=xen-devel@lists.xen.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.