[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/7] x86emul: don't special case fetching the immediate of PUSH



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@xxxxxxxx>

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@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.