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>
Subject: Re: [PATCH 1/7] x86emul: don't special case fetching the immediate of PUSH
Date: Thu, 11 Aug 2016 13:58:43 +0100	[thread overview]
Message-ID: <8b0a20e0-09c3-8cda-fda3-d5da5ddac117@citrix.com> (raw)
In-Reply-To: <57AC85B8020000780010509E@prv-mh.provo.novell.com>

On 11/08/16 13:03, Jan Beulich wrote:
> These immediates follow the standard patterns in all modes, so they're
> better fetched by the generic source operand handling code.
>
> To facilitate testing, instead of adding yet another of these pretty
> convoluted individual test cases, simply introduce another blowfish run
> with -mno-accumulate-outgoing-args (the additional -Dstatic is to
> keep the compiler from converting the calling convention to
> "regparm(3)", which I did observe it does).
>
> To make this introduction of a new blowfish pass (and potential further
> ones later one) have less impact on the readability of the final code,
> abstract all such "binary blob" executions via a table to iterate
> through.
>
> The resulting native code execution adjustment also uncovered a lack of
> clobbers on the asm() in the 64-bit case, which is being fixed at once.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

It would be helpful if the blob refactoring was in a separate patch to
the emulator bugfix.

> @@ -983,20 +993,27 @@ int main(int argc, char **argv)
>               (regs.eax != 2) || (regs.edx != 1) )
>              goto fail;
>          printf("okay\n");
> -    }
>  
> -    printf("%-40s", "Testing blowfish native execution...");    
> -    asm volatile (
> +        if ( ctxt.addr_size != sizeof(void *) * CHAR_BIT )
> +            continue;

This wants to be at the top of the loop, or we will attempt to emulate
64bit code in a 32bit build of the test before hitting this condition.

Otherwise, LGTM.

~Andrew

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

  reply	other threads:[~2016-08-11 12:58 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-11 11:53 [PATCH 0/7] x86emul: misc small adjustments Jan Beulich
2016-08-11 12:03 ` [PATCH 1/7] x86emul: don't special case fetching the immediate of PUSH Jan Beulich
2016-08-11 12:58   ` Andrew Cooper [this message]
2016-08-11 13:26     ` Jan Beulich
2016-08-11 17:33       ` Andrew Cooper
2016-08-11 12:04 ` [PATCH 2/7] x86emul: don't special case fetching immediates of near and short branches Jan Beulich
2016-08-11 13:19   ` Andrew Cooper
2016-08-11 13:27     ` Jan Beulich
2016-08-11 12:04 ` [PATCH 3/7] x86emul: all push flavors are data moves Jan Beulich
2016-08-11 13:40   ` Andrew Cooper
2016-08-11 12:05 ` [PATCH 4/7] x86emul: fold SrcImmByte fetching Jan Beulich
2016-08-11 13:41   ` Andrew Cooper
2016-08-11 14:09     ` Jan Beulich
2016-08-11 15:06       ` Andrew Cooper
2016-08-11 12:06 ` [PATCH 5/7] x86emul: don't special case fetching unsigned 8-bit immediates Jan Beulich
2016-08-11 16:32   ` Andrew Cooper
2016-08-11 16:44     ` Jan Beulich
2016-08-11 17:38       ` Andrew Cooper
2016-08-12 10:50         ` Jan Beulich
2016-08-12 11:47           ` Andrew Cooper
2016-08-11 12:06 ` [PATCH 6/7] x86emul: use DstEax where possible Jan Beulich
2016-08-11 16:41   ` Andrew Cooper
2016-08-11 12:07 ` [PATCH 7/7] x86emul: introduce SrcImm16 Jan Beulich
2016-08-11 17:23   ` Andrew Cooper

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=8b0a20e0-09c3-8cda-fda3-d5da5ddac117@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.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.