qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Henrique Barboza <danielhb413@gmail.com>
To: Joel Stanley <joel@jms.id.au>, Laurent Vivier <laurent@vivier.eu>,
	lucas.araujo@eldorado.org.br
Cc: Michael Ellerman <mpe@ellerman.id.au>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH] linux-user: Add PowerPC ISA 3.1 and MMA to hwcap
Date: Wed, 27 Apr 2022 17:51:33 -0300	[thread overview]
Message-ID: <e29248b7-1a61-87db-dc81-5c9db844b7cf@gmail.com> (raw)
In-Reply-To: <20220427064204.373027-1-joel@jms.id.au>



On 4/27/22 03:42, Joel Stanley wrote:
> These are new hwcap bits added for power10.
> 
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
> MMA support for TCG is on the list so I think it makes sense for this to
> land after those are merged.

I believe you mean this series:


[RFC PATCH 0/7] VSX MMA Implementation


In that case I'll queue this patch together with it.



Thanks,


Daniel


> 
> I tested my patch with this program:
> 
>   https://github.com/shenki/p10_tests
> 
> $ qemu-ppc64le -cpu power10  -L ~/ppc64le/ ./test -c
> HWCAP: 0x58000580 HWCAP2: 0x8ee60000
> ISAv3.1: Yes
> MMA: Yes
> 
> $ qemu-ppc64le -cpu power9  -L ~/ppc64le/ ./test -c
> HWCAP: 0x58000580 HWCAP2: 0x8ee00000
> ISAv3.1: No
> MMA: No
> 
>   linux-user/elfload.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/linux-user/elfload.c b/linux-user/elfload.c
> index 61063fd974e5..0908692e62b3 100644
> --- a/linux-user/elfload.c
> +++ b/linux-user/elfload.c
> @@ -779,6 +779,8 @@ enum {
>       QEMU_PPC_FEATURE2_DARN = 0x00200000, /* darn random number insn */
>       QEMU_PPC_FEATURE2_SCV = 0x00100000, /* scv syscall */
>       QEMU_PPC_FEATURE2_HTM_NO_SUSPEND = 0x00080000, /* TM w/o suspended state */
> +    QEMU_PPC_FEATURE2_ARCH_3_1 = 0x00040000, /* ISA 3.1 */
> +    QEMU_PPC_FEATURE2_MMA = 0x00020000, /* Matrix-Multiply Assist */
>   };
>   
>   #define ELF_HWCAP get_elf_hwcap()
> @@ -836,6 +838,8 @@ static uint32_t get_elf_hwcap2(void)
>                     QEMU_PPC_FEATURE2_VEC_CRYPTO);
>       GET_FEATURE2(PPC2_ISA300, QEMU_PPC_FEATURE2_ARCH_3_00 |
>                    QEMU_PPC_FEATURE2_DARN | QEMU_PPC_FEATURE2_HAS_IEEE128);
> +    GET_FEATURE2(PPC2_ISA310, QEMU_PPC_FEATURE2_ARCH_3_1 |
> +                 QEMU_PPC_FEATURE2_MMA);
>   
>   #undef GET_FEATURE
>   #undef GET_FEATURE2


  reply	other threads:[~2022-04-27 20:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27  6:42 [PATCH] linux-user: Add PowerPC ISA 3.1 and MMA to hwcap Joel Stanley
2022-04-27 20:51 ` Daniel Henrique Barboza [this message]
2022-05-05  6:07   ` Joel Stanley
2022-05-10 17:34   ` Lucas Mateus Martins Araujo e Castro
2022-05-10 20:22     ` Daniel Henrique Barboza

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=e29248b7-1a61-87db-dc81-5c9db844b7cf@gmail.com \
    --to=danielhb413@gmail.com \
    --cc=joel@jms.id.au \
    --cc=laurent@vivier.eu \
    --cc=lucas.araujo@eldorado.org.br \
    --cc=mpe@ellerman.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).