All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] linux-user: Add PowerPC ISA 3.1 and MMA to hwcap
@ 2022-04-27  6:42 Joel Stanley
  2022-04-27 20:51 ` Daniel Henrique Barboza
  0 siblings, 1 reply; 5+ messages in thread
From: Joel Stanley @ 2022-04-27  6:42 UTC (permalink / raw)
  To: Laurent Vivier, lucas.araujo; +Cc: Michael Ellerman, qemu-ppc, qemu-devel

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 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
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] linux-user: Add PowerPC ISA 3.1 and MMA to hwcap
  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
  2022-05-05  6:07   ` Joel Stanley
  2022-05-10 17:34   ` Lucas Mateus Martins Araujo e Castro
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel Henrique Barboza @ 2022-04-27 20:51 UTC (permalink / raw)
  To: Joel Stanley, Laurent Vivier, lucas.araujo
  Cc: Michael Ellerman, qemu-ppc, qemu-devel



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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] linux-user: Add PowerPC ISA 3.1 and MMA to hwcap
  2022-04-27 20:51 ` Daniel Henrique Barboza
@ 2022-05-05  6:07   ` Joel Stanley
  2022-05-10 17:34   ` Lucas Mateus Martins Araujo e Castro
  1 sibling, 0 replies; 5+ messages in thread
From: Joel Stanley @ 2022-05-05  6:07 UTC (permalink / raw)
  To: Daniel Henrique Barboza
  Cc: Laurent Vivier, Lucas Mateus Castro(alqotel),
	Michael Ellerman, qemu-ppc, QEMU Developers

On Wed, 27 Apr 2022 at 20:51, Daniel Henrique Barboza
<danielhb413@gmail.com> wrote:
>
>
>
> 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.

That's the one, thanks.

Cheers,

Joel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] linux-user: Add PowerPC ISA 3.1 and MMA to hwcap
  2022-04-27 20:51 ` Daniel Henrique Barboza
  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
  1 sibling, 1 reply; 5+ messages in thread
From: Lucas Mateus Martins Araujo e Castro @ 2022-05-10 17:34 UTC (permalink / raw)
  To: Daniel Henrique Barboza, Joel Stanley, Laurent Vivier
  Cc: Michael Ellerman, qemu-ppc, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 926 bytes --]


On 27/04/2022 17:51, Daniel Henrique Barboza wrote:
> 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.
Daniel and Joel, do you want me to send this with my patch series so 
there's no need to rebase this patch and they can be added together?
>
>
>
> Thanks,
>
>
> Daniel
>
>
-- 
Lucas Mateus M. Araujo e Castro
Instituto de Pesquisas ELDORADO 
<https://www.eldorado.org.br/?utm_campaign=assinatura_de_e-mail&utm_medium=email&utm_source=RD+Station>
Departamento Computação Embarcada
Analista de Software Trainee
Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>

[-- Attachment #2: Type: text/html, Size: 1920 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] linux-user: Add PowerPC ISA 3.1 and MMA to hwcap
  2022-05-10 17:34   ` Lucas Mateus Martins Araujo e Castro
@ 2022-05-10 20:22     ` Daniel Henrique Barboza
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Henrique Barboza @ 2022-05-10 20:22 UTC (permalink / raw)
  To: Lucas Mateus Martins Araujo e Castro, Joel Stanley, Laurent Vivier
  Cc: Michael Ellerman, qemu-ppc, qemu-devel



On 5/10/22 14:34, Lucas Mateus Martins Araujo e Castro wrote:
> 
> On 27/04/2022 17:51, Daniel Henrique Barboza wrote:
>> 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.
> Daniel and Joel, do you want me to send this with my patch series so there's no need to rebase this patch and they can be added together?

Yes please. That'll make my life easier when queueing them.


Daniel

>>
>>
>>
>> Thanks,
>>
>>
>> Daniel
>>
>>
> -- 
> Lucas Mateus M. Araujo e Castro
> Instituto de Pesquisas ELDORADO <https://www.eldorado.org.br/?utm_campaign=assinatura_de_e-mail&utm_medium=email&utm_source=RD+Station>
> Departamento Computação Embarcada
> Analista de Software Trainee
> Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-10 20:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.