All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Richard W.M. Jones" <rjones@redhat.com>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: Tom Musta <tommusta@gmail.com>,
	qemu-stable@nongnu.org, crobinso@redhat.com,
	qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH 2/2] target-ppc: fix xscmpodp and xscmpudp decoding
Date: Sun, 20 Sep 2015 15:46:59 +0100	[thread overview]
Message-ID: <20150920144659.GA16943@redhat.com> (raw)
In-Reply-To: <1442178225-26780-3-git-send-email-aurelien@aurel32.net>

On Sun, Sep 13, 2015 at 11:03:45PM +0200, Aurelien Jarno wrote:
> The xscmpodp and xscmpudp instructions only have the AX, BX bits in
> there encoding, the lowest bit (usually TX) is marked as an invalid
> bit. We therefore can't decode them with GEN_XX2FORM, which decodes
> the two lowest bit.
> 
> Introduce a new form GEN_XX2FORM, which decodes AX and BX and mark
> the lowest bit as invalid.
> 
> Cc: Tom Musta <tommusta@gmail.com>
> Cc: Alexander Graf <agraf@suse.de>
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
>  target-ppc/translate.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/target-ppc/translate.c b/target-ppc/translate.c
> index 84c5cea..c0eed13 100644
> --- a/target-ppc/translate.c
> +++ b/target-ppc/translate.c
> @@ -10670,6 +10670,13 @@ GEN_HANDLER2_E(name, #name, 0x3C, opc2 | 1, opc3, 0, PPC_NONE, fl2), \
>  GEN_HANDLER2_E(name, #name, 0x3C, opc2 | 2, opc3, 0, PPC_NONE, fl2), \
>  GEN_HANDLER2_E(name, #name, 0x3C, opc2 | 3, opc3, 0, PPC_NONE, fl2)
>  
> +#undef GEN_XX2IFORM
> +#define GEN_XX2IFORM(name, opc2, opc3, fl2)                           \
> +GEN_HANDLER2_E(name, #name, 0x3C, opc2 | 0, opc3, 1, PPC_NONE, fl2), \
> +GEN_HANDLER2_E(name, #name, 0x3C, opc2 | 1, opc3, 1, PPC_NONE, fl2), \
> +GEN_HANDLER2_E(name, #name, 0x3C, opc2 | 2, opc3, 1, PPC_NONE, fl2), \
> +GEN_HANDLER2_E(name, #name, 0x3C, opc2 | 3, opc3, 1, PPC_NONE, fl2)
> +
>  #undef GEN_XX3_RC_FORM
>  #define GEN_XX3_RC_FORM(name, opc2, opc3, fl2)                          \
>  GEN_HANDLER2_E(name, #name, 0x3C, opc2 | 0x00, opc3 | 0x00, 0, PPC_NONE, fl2), \
> @@ -10731,8 +10738,8 @@ GEN_XX3FORM(xsnmaddadp, 0x04, 0x14, PPC2_VSX),
>  GEN_XX3FORM(xsnmaddmdp, 0x04, 0x15, PPC2_VSX),
>  GEN_XX3FORM(xsnmsubadp, 0x04, 0x16, PPC2_VSX),
>  GEN_XX3FORM(xsnmsubmdp, 0x04, 0x17, PPC2_VSX),
> -GEN_XX2FORM(xscmpodp,  0x0C, 0x05, PPC2_VSX),
> -GEN_XX2FORM(xscmpudp,  0x0C, 0x04, PPC2_VSX),
> +GEN_XX2IFORM(xscmpodp,  0x0C, 0x05, PPC2_VSX),
> +GEN_XX2IFORM(xscmpudp,  0x0C, 0x04, PPC2_VSX),
>  GEN_XX3FORM(xsmaxdp, 0x00, 0x14, PPC2_VSX),
>  GEN_XX3FORM(xsmindp, 0x00, 0x15, PPC2_VSX),
>  GEN_XX2FORM(xscvdpsp, 0x12, 0x10, PPC2_VSX),

This particular patch fixed a number of crashes I was experiencing in
libm in Fedora 22 (ppc64), which I traced to the xscmpudp instruction
causing SIGILL.

So:

  Tested-by: Richard W.M. Jones <rjones@redhat.com>

Cole: I think we should add this small patch series to Fedora, even
though it's not upstream yet, since it required for running F22/ppc64
guests reliably (on non-ppc hosts).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/

  reply	other threads:[~2015-09-20 14:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-13 21:03 [Qemu-devel] [PATCH 0/2] target-ppc: vector instruction fixes Aurelien Jarno
2015-09-13 21:03 ` [Qemu-devel] [PATCH 1/2] target-ppc: fix vcipher, vcipherlast, vncipherlast and vpermxor Aurelien Jarno
2015-09-22 10:11   ` Thomas Huth
2015-09-13 21:03 ` [Qemu-devel] [PATCH 2/2] target-ppc: fix xscmpodp and xscmpudp decoding Aurelien Jarno
2015-09-20 14:46   ` Richard W.M. Jones [this message]
2015-09-22 10:26   ` Thomas Huth
2015-09-22 21:28     ` Aurelien Jarno
2015-09-23 11:12       ` Tom Musta
2015-09-17  4:58 ` [Qemu-devel] [PATCH 0/2] target-ppc: vector instruction fixes Richard Henderson
2015-09-20 20:29   ` Alexander Graf

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=20150920144659.GA16943@redhat.com \
    --to=rjones@redhat.com \
    --cc=agraf@suse.de \
    --cc=aurelien@aurel32.net \
    --cc=crobinso@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=tommusta@gmail.com \
    /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.