All of lore.kernel.org
 help / color / mirror / Atom feed
* Issue with qemu-system-ppc running OSX guests
@ 2022-03-02 20:03 Howard Spoelstra
  2022-03-02 20:11 ` BALATON Zoltan
  0 siblings, 1 reply; 9+ messages in thread
From: Howard Spoelstra @ 2022-03-02 20:03 UTC (permalink / raw)
  To: qemu-devel qemu-devel

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

Hi all,

I noticed qemu-system-ppc running OSX guests does not get to the desktop or
does not display the menu bars.

Bisecting lead to this commit:

80eca687c8513a7e1611e0441abdd68b0c02a1d6 is the first bad commit
commit 80eca687c8513a7e1611e0441abdd68b0c02a1d6
Author: Lucas Mateus Castro (alqotel) <lucas.castro@eldorado.org.br>
Date:   Wed Mar 2 06:51:36 2022 +0100

    target/ppc: moved vector even and odd multiplication to decodetree

    Moved the instructions vmulesb, vmulosb, vmuleub, vmuloub,
    vmulesh, vmulosh, vmuleuh, vmulouh, vmulesw, vmulosw,
    muleuw and vmulouw from legacy to decodetree. Implemented
    the instructions vmulesd, vmulosd, vmuleud, vmuloud.

    Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
    Signed-off-by: Lucas Mateus Castro (alqotel) <
lucas.araujo@eldorado.org.br>
    Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
    Message-Id: <20220225210936.1749575-3-matheus.ferst@eldorado.org.br>
    Signed-off-by: Cédric Le Goater <clg@kaod.org>

 target/ppc/helper.h                 | 24 ++++++------
 target/ppc/insn32.decode            | 22 +++++++++++
 target/ppc/int_helper.c             | 20 +++++-----
 target/ppc/translate/vmx-impl.c.inc | 77
++++++++++++++++++++++++++++---------
 target/ppc/translate/vmx-ops.c.inc  | 15 ++------
 tcg/ppc/tcg-target.c.inc            |  6 +++
 6 files changed, 112 insertions(+), 52 deletions(-)

Best,
Howard

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

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

* Re: Issue with qemu-system-ppc running OSX guests
  2022-03-02 20:03 Issue with qemu-system-ppc running OSX guests Howard Spoelstra
@ 2022-03-02 20:11 ` BALATON Zoltan
  2022-03-02 20:21   ` Howard Spoelstra
  0 siblings, 1 reply; 9+ messages in thread
From: BALATON Zoltan @ 2022-03-02 20:11 UTC (permalink / raw)
  To: Howard Spoelstra; +Cc: lucas.castro, qemu-ppc, qemu-devel qemu-devel

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

On Wed, 2 Mar 2022, Howard Spoelstra wrote:
> Hi all,
>
> I noticed qemu-system-ppc running OSX guests does not get to the desktop or
> does not display the menu bars.

Cc-ing the relevant people and the PPC list might help, I've added them. 
Also telling which OSX guest version can reproduce the problem could help 
debugging. Is it any OSX version?

Regards,
BALATON Zoltan

> Bisecting lead to this commit:
>
> 80eca687c8513a7e1611e0441abdd68b0c02a1d6 is the first bad commit
> commit 80eca687c8513a7e1611e0441abdd68b0c02a1d6
> Author: Lucas Mateus Castro (alqotel) <lucas.castro@eldorado.org.br>
> Date:   Wed Mar 2 06:51:36 2022 +0100
>
>    target/ppc: moved vector even and odd multiplication to decodetree
>
>    Moved the instructions vmulesb, vmulosb, vmuleub, vmuloub,
>    vmulesh, vmulosh, vmuleuh, vmulouh, vmulesw, vmulosw,
>    muleuw and vmulouw from legacy to decodetree. Implemented
>    the instructions vmulesd, vmulosd, vmuleud, vmuloud.
>
>    Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>    Signed-off-by: Lucas Mateus Castro (alqotel) <
> lucas.araujo@eldorado.org.br>
>    Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
>    Message-Id: <20220225210936.1749575-3-matheus.ferst@eldorado.org.br>
>    Signed-off-by: Cédric Le Goater <clg@kaod.org>
>
> target/ppc/helper.h                 | 24 ++++++------
> target/ppc/insn32.decode            | 22 +++++++++++
> target/ppc/int_helper.c             | 20 +++++-----
> target/ppc/translate/vmx-impl.c.inc | 77
> ++++++++++++++++++++++++++++---------
> target/ppc/translate/vmx-ops.c.inc  | 15 ++------
> tcg/ppc/tcg-target.c.inc            |  6 +++
> 6 files changed, 112 insertions(+), 52 deletions(-)
>
> Best,
> Howard
>

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

* Re: Issue with qemu-system-ppc running OSX guests
  2022-03-02 20:11 ` BALATON Zoltan
@ 2022-03-02 20:21   ` Howard Spoelstra
  2022-03-02 23:55     ` Fabiano Rosas
  0 siblings, 1 reply; 9+ messages in thread
From: Howard Spoelstra @ 2022-03-02 20:21 UTC (permalink / raw)
  To: BALATON Zoltan; +Cc: lucas.castro, qemu-ppc, qemu-devel qemu-devel

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

On Wed, Mar 2, 2022 at 9:11 PM BALATON Zoltan <balaton@eik.bme.hu> wrote:

> On Wed, 2 Mar 2022, Howard Spoelstra wrote:
> > Hi all,
> >
> > I noticed qemu-system-ppc running OSX guests does not get to the desktop
> or
> > does not display the menu bars.
>
> Cc-ing the relevant people and the PPC list might help, I've added them.
> Also telling which OSX guest version can reproduce the problem could help
> debugging. Is it any OSX version?
>
> Regards,
> BALATON Zoltan
>

Oops, Qemu running on Fedora 35 host,
Reproducer:

./qemu-system-ppc \
-M mac99 \
-m 512 \
-L pc-bios \
-display sdl -serial stdio \
-boot c \
-drive file=10.1.img,format=raw,media=disk

The issue affects all supported Mac OSX guests: 10.0 to 10.5

Best,
Howard


> > Bisecting lead to this commit:
> >
> > 80eca687c8513a7e1611e0441abdd68b0c02a1d6 is the first bad commit
> > commit 80eca687c8513a7e1611e0441abdd68b0c02a1d6
> > Author: Lucas Mateus Castro (alqotel) <lucas.castro@eldorado.org.br>
> > Date:   Wed Mar 2 06:51:36 2022 +0100
> >
> >    target/ppc: moved vector even and odd multiplication to decodetree
> >
> >    Moved the instructions vmulesb, vmulosb, vmuleub, vmuloub,
> >    vmulesh, vmulosh, vmuleuh, vmulouh, vmulesw, vmulosw,
> >    muleuw and vmulouw from legacy to decodetree. Implemented
> >    the instructions vmulesd, vmulosd, vmuleud, vmuloud.
> >
> >    Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> >    Signed-off-by: Lucas Mateus Castro (alqotel) <
> > lucas.araujo@eldorado.org.br>
> >    Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
> >    Message-Id: <20220225210936.1749575-3-matheus.ferst@eldorado.org.br>
> >    Signed-off-by: Cédric Le Goater <clg@kaod.org>
> >
> > target/ppc/helper.h                 | 24 ++++++------
> > target/ppc/insn32.decode            | 22 +++++++++++
> > target/ppc/int_helper.c             | 20 +++++-----
> > target/ppc/translate/vmx-impl.c.inc | 77
> > ++++++++++++++++++++++++++++---------
> > target/ppc/translate/vmx-ops.c.inc  | 15 ++------
> > tcg/ppc/tcg-target.c.inc            |  6 +++
> > 6 files changed, 112 insertions(+), 52 deletions(-)
> >
> > Best,
> > Howard
> >

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

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

* Re: Issue with qemu-system-ppc running OSX guests
  2022-03-02 20:21   ` Howard Spoelstra
@ 2022-03-02 23:55     ` Fabiano Rosas
  2022-03-03  5:47       ` Howard Spoelstra
  2022-03-04 11:08       ` Lucas Mateus Martins Araujo e Castro
  0 siblings, 2 replies; 9+ messages in thread
From: Fabiano Rosas @ 2022-03-02 23:55 UTC (permalink / raw)
  To: Howard Spoelstra, BALATON Zoltan
  Cc: lucas.castro, qemu-ppc, qemu-devel qemu-devel

Howard Spoelstra <hsp.cat7@gmail.com> writes:

> On Wed, Mar 2, 2022 at 9:11 PM BALATON Zoltan <balaton@eik.bme.hu> wrote:
>
>> On Wed, 2 Mar 2022, Howard Spoelstra wrote:
>> > Hi all,
>> >
>> > I noticed qemu-system-ppc running OSX guests does not get to the desktop
>> or
>> > does not display the menu bars.
>>
>> Cc-ing the relevant people and the PPC list might help, I've added them.
>> Also telling which OSX guest version can reproduce the problem could help
>> debugging. Is it any OSX version?
>>
>> Regards,
>> BALATON Zoltan
>>
>
> Oops, Qemu running on Fedora 35 host,
> Reproducer:
>
> ./qemu-system-ppc \
> -M mac99 \
> -m 512 \
> -L pc-bios \
> -display sdl -serial stdio \
> -boot c \
> -drive file=10.1.img,format=raw,media=disk
>
> The issue affects all supported Mac OSX guests: 10.0 to 10.5

Hi Howard,

Thanks for bisecting this. It seems we inadvertently marked some of the
Vector Multiply instructions to be ISA v2.07 only.

I can boot Mac OSX 10.4 until the desktop with this fix:

diff --git a/target/ppc/translate/vmx-impl.c.inc b/target/ppc/translate/vmx-impl.c.inc
index f91bee839d..c5d02d13fe 100644
--- a/target/ppc/translate/vmx-impl.c.inc
+++ b/target/ppc/translate/vmx-impl.c.inc
@@ -3141,14 +3141,14 @@ static bool trans_VMULLD(DisasContext *ctx, arg_VX *a)
     return true;
 }
 
-TRANS_FLAGS2(ALTIVEC_207, VMULESB, do_vx_helper, gen_helper_VMULESB)
-TRANS_FLAGS2(ALTIVEC_207, VMULOSB, do_vx_helper, gen_helper_VMULOSB)
-TRANS_FLAGS2(ALTIVEC_207, VMULEUB, do_vx_helper, gen_helper_VMULEUB)
-TRANS_FLAGS2(ALTIVEC_207, VMULOUB, do_vx_helper, gen_helper_VMULOUB)
-TRANS_FLAGS2(ALTIVEC_207, VMULESH, do_vx_helper, gen_helper_VMULESH)
-TRANS_FLAGS2(ALTIVEC_207, VMULOSH, do_vx_helper, gen_helper_VMULOSH)
-TRANS_FLAGS2(ALTIVEC_207, VMULEUH, do_vx_helper, gen_helper_VMULEUH)
-TRANS_FLAGS2(ALTIVEC_207, VMULOUH, do_vx_helper, gen_helper_VMULOUH)
+TRANS_FLAGS(ALTIVEC, VMULESB, do_vx_helper, gen_helper_VMULESB)
+TRANS_FLAGS(ALTIVEC, VMULOSB, do_vx_helper, gen_helper_VMULOSB)
+TRANS_FLAGS(ALTIVEC, VMULEUB, do_vx_helper, gen_helper_VMULEUB)
+TRANS_FLAGS(ALTIVEC, VMULOUB, do_vx_helper, gen_helper_VMULOUB)
+TRANS_FLAGS(ALTIVEC, VMULESH, do_vx_helper, gen_helper_VMULESH)
+TRANS_FLAGS(ALTIVEC, VMULOSH, do_vx_helper, gen_helper_VMULOSH)
+TRANS_FLAGS(ALTIVEC, VMULEUH, do_vx_helper, gen_helper_VMULEUH)
+TRANS_FLAGS(ALTIVEC, VMULOUH, do_vx_helper, gen_helper_VMULOUH)
 TRANS_FLAGS2(ALTIVEC_207, VMULESW, do_vx_helper, gen_helper_VMULESW)
 TRANS_FLAGS2(ALTIVEC_207, VMULOSW, do_vx_helper, gen_helper_VMULOSW)
 TRANS_FLAGS2(ALTIVEC_207, VMULEUW, do_vx_helper, gen_helper_VMULEUW)
---

I'll let Lucas comment on it and we can send a proper patch in the
morning.


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

* Re: Issue with qemu-system-ppc running OSX guests
  2022-03-02 23:55     ` Fabiano Rosas
@ 2022-03-03  5:47       ` Howard Spoelstra
  2022-03-04 11:08       ` Lucas Mateus Martins Araujo e Castro
  1 sibling, 0 replies; 9+ messages in thread
From: Howard Spoelstra @ 2022-03-03  5:47 UTC (permalink / raw)
  To: Fabiano Rosas; +Cc: lucas.castro, qemu-ppc, qemu-devel qemu-devel

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

On Thu, Mar 3, 2022 at 12:55 AM Fabiano Rosas <farosas@linux.ibm.com> wrote:

> Howard Spoelstra <hsp.cat7@gmail.com> writes:
>
> > On Wed, Mar 2, 2022 at 9:11 PM BALATON Zoltan <balaton@eik.bme.hu>
> wrote:
> >
> >> On Wed, 2 Mar 2022, Howard Spoelstra wrote:
> >> > Hi all,
> >> >
> >> > I noticed qemu-system-ppc running OSX guests does not get to the
> desktop
> >> or
> >> > does not display the menu bars.
> >>
> >> Cc-ing the relevant people and the PPC list might help, I've added them.
> >> Also telling which OSX guest version can reproduce the problem could
> help
> >> debugging. Is it any OSX version?
> >>
> >> Regards,
> >> BALATON Zoltan
> >>
> >
> > Oops, Qemu running on Fedora 35 host,
> > Reproducer:
> >
> > ./qemu-system-ppc \
> > -M mac99 \
> > -m 512 \
> > -L pc-bios \
> > -display sdl -serial stdio \
> > -boot c \
> > -drive file=10.1.img,format=raw,media=disk
> >
> > The issue affects all supported Mac OSX guests: 10.0 to 10.5
>
> Hi Howard,
>
> Thanks for bisecting this. It seems we inadvertently marked some of the
> Vector Multiply instructions to be ISA v2.07 only.
>
> I can boot Mac OSX 10.4 until the desktop with this fix:
>
> diff --git a/target/ppc/translate/vmx-impl.c.inc
> b/target/ppc/translate/vmx-impl.c.inc
> index f91bee839d..c5d02d13fe 100644
> --- a/target/ppc/translate/vmx-impl.c.inc
> +++ b/target/ppc/translate/vmx-impl.c.inc
> @@ -3141,14 +3141,14 @@ static bool trans_VMULLD(DisasContext *ctx, arg_VX
> *a)
>      return true;
>  }
>
> -TRANS_FLAGS2(ALTIVEC_207, VMULESB, do_vx_helper, gen_helper_VMULESB)
> -TRANS_FLAGS2(ALTIVEC_207, VMULOSB, do_vx_helper, gen_helper_VMULOSB)
> -TRANS_FLAGS2(ALTIVEC_207, VMULEUB, do_vx_helper, gen_helper_VMULEUB)
> -TRANS_FLAGS2(ALTIVEC_207, VMULOUB, do_vx_helper, gen_helper_VMULOUB)
> -TRANS_FLAGS2(ALTIVEC_207, VMULESH, do_vx_helper, gen_helper_VMULESH)
> -TRANS_FLAGS2(ALTIVEC_207, VMULOSH, do_vx_helper, gen_helper_VMULOSH)
> -TRANS_FLAGS2(ALTIVEC_207, VMULEUH, do_vx_helper, gen_helper_VMULEUH)
> -TRANS_FLAGS2(ALTIVEC_207, VMULOUH, do_vx_helper, gen_helper_VMULOUH)
> +TRANS_FLAGS(ALTIVEC, VMULESB, do_vx_helper, gen_helper_VMULESB)
> +TRANS_FLAGS(ALTIVEC, VMULOSB, do_vx_helper, gen_helper_VMULOSB)
> +TRANS_FLAGS(ALTIVEC, VMULEUB, do_vx_helper, gen_helper_VMULEUB)
> +TRANS_FLAGS(ALTIVEC, VMULOUB, do_vx_helper, gen_helper_VMULOUB)
> +TRANS_FLAGS(ALTIVEC, VMULESH, do_vx_helper, gen_helper_VMULESH)
> +TRANS_FLAGS(ALTIVEC, VMULOSH, do_vx_helper, gen_helper_VMULOSH)
> +TRANS_FLAGS(ALTIVEC, VMULEUH, do_vx_helper, gen_helper_VMULEUH)
> +TRANS_FLAGS(ALTIVEC, VMULOUH, do_vx_helper, gen_helper_VMULOUH)
>  TRANS_FLAGS2(ALTIVEC_207, VMULESW, do_vx_helper, gen_helper_VMULESW)
>  TRANS_FLAGS2(ALTIVEC_207, VMULOSW, do_vx_helper, gen_helper_VMULOSW)
>  TRANS_FLAGS2(ALTIVEC_207, VMULEUW, do_vx_helper, gen_helper_VMULEUW)
> ---
>
> I'll let Lucas comment on it and we can send a proper patch in the
> morning.
>

Hi,

Thanks, this patch does indeed fix the issue.

Best,
Howard

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

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

* Re: Issue with qemu-system-ppc running OSX guests
  2022-03-02 23:55     ` Fabiano Rosas
  2022-03-03  5:47       ` Howard Spoelstra
@ 2022-03-04 11:08       ` Lucas Mateus Martins Araujo e Castro
  2022-03-04 14:07         ` Cédric Le Goater
  1 sibling, 1 reply; 9+ messages in thread
From: Lucas Mateus Martins Araujo e Castro @ 2022-03-04 11:08 UTC (permalink / raw)
  To: qemu-ppc, Howard Spoelstra, BALATON Zoltan, Fabiano Rosas
  Cc: qemu-devel qemu-devel

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


On 02/03/2022 20:55, Fabiano Rosas wrote:
> Howard Spoelstra<hsp.cat7@gmail.com>  writes:
>
>> On Wed, Mar 2, 2022 at 9:11 PM BALATON Zoltan<balaton@eik.bme.hu>  wrote:
>>
>>> On Wed, 2 Mar 2022, Howard Spoelstra wrote:
>>>> Hi all,
>>>>
>>>> I noticed qemu-system-ppc running OSX guests does not get to the desktop
>>> or
>>>> does not display the menu bars.
>>> Cc-ing the relevant people and the PPC list might help, I've added them.
>>> Also telling which OSX guest version can reproduce the problem could help
>>> debugging. Is it any OSX version?
>>>
>>> Regards,
>>> BALATON Zoltan
>>>
>> Oops, Qemu running on Fedora 35 host,
>> Reproducer:
>>
>> ./qemu-system-ppc \
>> -M mac99 \
>> -m 512 \
>> -L pc-bios \
>> -display sdl -serial stdio \
>> -boot c \
>> -drive file=10.1.img,format=raw,media=disk
>>
>> The issue affects all supported Mac OSX guests: 10.0 to 10.5
> Hi Howard,
>
> Thanks for bisecting this. It seems we inadvertently marked some of the
> Vector Multiply instructions to be ISA v2.07 only.
>
> I can boot Mac OSX 10.4 until the desktop with this fix:
>
> diff --git a/target/ppc/translate/vmx-impl.c.inc b/target/ppc/translate/vmx-impl.c.inc
> index f91bee839d..c5d02d13fe 100644
> --- a/target/ppc/translate/vmx-impl.c.inc
> +++ b/target/ppc/translate/vmx-impl.c.inc
> @@ -3141,14 +3141,14 @@ static bool trans_VMULLD(DisasContext *ctx, arg_VX *a)
>       return true;
>   }
>
> -TRANS_FLAGS2(ALTIVEC_207, VMULESB, do_vx_helper, gen_helper_VMULESB)
> -TRANS_FLAGS2(ALTIVEC_207, VMULOSB, do_vx_helper, gen_helper_VMULOSB)
> -TRANS_FLAGS2(ALTIVEC_207, VMULEUB, do_vx_helper, gen_helper_VMULEUB)
> -TRANS_FLAGS2(ALTIVEC_207, VMULOUB, do_vx_helper, gen_helper_VMULOUB)
> -TRANS_FLAGS2(ALTIVEC_207, VMULESH, do_vx_helper, gen_helper_VMULESH)
> -TRANS_FLAGS2(ALTIVEC_207, VMULOSH, do_vx_helper, gen_helper_VMULOSH)
> -TRANS_FLAGS2(ALTIVEC_207, VMULEUH, do_vx_helper, gen_helper_VMULEUH)
> -TRANS_FLAGS2(ALTIVEC_207, VMULOUH, do_vx_helper, gen_helper_VMULOUH)
> +TRANS_FLAGS(ALTIVEC, VMULESB, do_vx_helper, gen_helper_VMULESB)
> +TRANS_FLAGS(ALTIVEC, VMULOSB, do_vx_helper, gen_helper_VMULOSB)
> +TRANS_FLAGS(ALTIVEC, VMULEUB, do_vx_helper, gen_helper_VMULEUB)
> +TRANS_FLAGS(ALTIVEC, VMULOUB, do_vx_helper, gen_helper_VMULOUB)
> +TRANS_FLAGS(ALTIVEC, VMULESH, do_vx_helper, gen_helper_VMULESH)
> +TRANS_FLAGS(ALTIVEC, VMULOSH, do_vx_helper, gen_helper_VMULOSH)
> +TRANS_FLAGS(ALTIVEC, VMULEUH, do_vx_helper, gen_helper_VMULEUH)
> +TRANS_FLAGS(ALTIVEC, VMULOUH, do_vx_helper, gen_helper_VMULOUH)
>   TRANS_FLAGS2(ALTIVEC_207, VMULESW, do_vx_helper, gen_helper_VMULESW)
>   TRANS_FLAGS2(ALTIVEC_207, VMULOSW, do_vx_helper, gen_helper_VMULOSW)
>   TRANS_FLAGS2(ALTIVEC_207, VMULEUW, do_vx_helper, gen_helper_VMULEUW)
> ---
>
> I'll let Lucas comment on it and we can send a proper patch in the
> morning.

Checking here it seems I misread the PowerISA appendix and marked these 
instructions (vmul[eo].[bh]) as v2.07 even though they are v2.03.

This patch seems to correct it and checking here the newer instructions 
are correct (v2.07 for vmul[eo].w and v3.1 for vmul[eo].d), so

Reviewed-by: Lucas Mateus Castro<lucas.araujo@eldorado.org.br>

-- 
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: 4743 bytes --]

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

* Re: Issue with qemu-system-ppc running OSX guests
  2022-03-04 11:08       ` Lucas Mateus Martins Araujo e Castro
@ 2022-03-04 14:07         ` Cédric Le Goater
  2022-03-04 14:18           ` Lucas Mateus Martins Araujo e Castro
  0 siblings, 1 reply; 9+ messages in thread
From: Cédric Le Goater @ 2022-03-04 14:07 UTC (permalink / raw)
  To: Lucas Mateus Martins Araujo e Castro, qemu-ppc, Howard Spoelstra,
	BALATON Zoltan, Fabiano Rosas
  Cc: qemu-devel qemu-devel

On 3/4/22 12:08, Lucas Mateus Martins Araujo e Castro wrote:
> 
> On 02/03/2022 20:55, Fabiano Rosas wrote:
>> Howard Spoelstra<hsp.cat7@gmail.com>  writes:
>>
>>> On Wed, Mar 2, 2022 at 9:11 PM BALATON Zoltan<balaton@eik.bme.hu>  wrote:
>>>
>>>> On Wed, 2 Mar 2022, Howard Spoelstra wrote:
>>>>> Hi all,
>>>>>
>>>>> I noticed qemu-system-ppc running OSX guests does not get to the desktop
>>>> or
>>>>> does not display the menu bars.
>>>> Cc-ing the relevant people and the PPC list might help, I've added them.
>>>> Also telling which OSX guest version can reproduce the problem could help
>>>> debugging. Is it any OSX version?
>>>>
>>>> Regards,
>>>> BALATON Zoltan
>>>>
>>> Oops, Qemu running on Fedora 35 host,
>>> Reproducer:
>>>
>>> ./qemu-system-ppc \
>>> -M mac99 \
>>> -m 512 \
>>> -L pc-bios \
>>> -display sdl -serial stdio \
>>> -boot c \
>>> -drive file=10.1.img,format=raw,media=disk
>>>
>>> The issue affects all supported Mac OSX guests: 10.0 to 10.5
>> Hi Howard,
>>
>> Thanks for bisecting this. It seems we inadvertently marked some of the
>> Vector Multiply instructions to be ISA v2.07 only.
>>
>> I can boot Mac OSX 10.4 until the desktop with this fix:
>>
>> diff --git a/target/ppc/translate/vmx-impl.c.inc b/target/ppc/translate/vmx-impl.c.inc
>> index f91bee839d..c5d02d13fe 100644
>> --- a/target/ppc/translate/vmx-impl.c.inc
>> +++ b/target/ppc/translate/vmx-impl.c.inc
>> @@ -3141,14 +3141,14 @@ static bool trans_VMULLD(DisasContext *ctx, arg_VX *a)
>>       return true;
>>   }
>>
>> -TRANS_FLAGS2(ALTIVEC_207, VMULESB, do_vx_helper, gen_helper_VMULESB)
>> -TRANS_FLAGS2(ALTIVEC_207, VMULOSB, do_vx_helper, gen_helper_VMULOSB)
>> -TRANS_FLAGS2(ALTIVEC_207, VMULEUB, do_vx_helper, gen_helper_VMULEUB)
>> -TRANS_FLAGS2(ALTIVEC_207, VMULOUB, do_vx_helper, gen_helper_VMULOUB)
>> -TRANS_FLAGS2(ALTIVEC_207, VMULESH, do_vx_helper, gen_helper_VMULESH)
>> -TRANS_FLAGS2(ALTIVEC_207, VMULOSH, do_vx_helper, gen_helper_VMULOSH)
>> -TRANS_FLAGS2(ALTIVEC_207, VMULEUH, do_vx_helper, gen_helper_VMULEUH)
>> -TRANS_FLAGS2(ALTIVEC_207, VMULOUH, do_vx_helper, gen_helper_VMULOUH)
>> +TRANS_FLAGS(ALTIVEC, VMULESB, do_vx_helper, gen_helper_VMULESB)
>> +TRANS_FLAGS(ALTIVEC, VMULOSB, do_vx_helper, gen_helper_VMULOSB)
>> +TRANS_FLAGS(ALTIVEC, VMULEUB, do_vx_helper, gen_helper_VMULEUB)
>> +TRANS_FLAGS(ALTIVEC, VMULOUB, do_vx_helper, gen_helper_VMULOUB)
>> +TRANS_FLAGS(ALTIVEC, VMULESH, do_vx_helper, gen_helper_VMULESH)
>> +TRANS_FLAGS(ALTIVEC, VMULOSH, do_vx_helper, gen_helper_VMULOSH)
>> +TRANS_FLAGS(ALTIVEC, VMULEUH, do_vx_helper, gen_helper_VMULEUH)
>> +TRANS_FLAGS(ALTIVEC, VMULOUH, do_vx_helper, gen_helper_VMULOUH)
>>   TRANS_FLAGS2(ALTIVEC_207, VMULESW, do_vx_helper, gen_helper_VMULESW)
>>   TRANS_FLAGS2(ALTIVEC_207, VMULOSW, do_vx_helper, gen_helper_VMULOSW)
>>   TRANS_FLAGS2(ALTIVEC_207, VMULEUW, do_vx_helper, gen_helper_VMULEUW)
>> ---
>>
>> I'll let Lucas comment on it and we can send a proper patch in the
>> morning.
> 
> Checking here it seems I misread the PowerISA appendix and marked these instructions (vmul[eo].[bh]) as v2.07 even though they are v2.03.
> 
> This patch seems to correct it and checking here the newer instructions are correct (v2.07 for vmul[eo].w and v3.1 for vmul[eo].d), so
> 
> Reviewed-by: Lucas Mateus Castro<lucas.araujo@eldorado.org.br>


Could you please send a proper patch ? The above was given as an example.

Thanks,

C.



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

* Re: Issue with qemu-system-ppc running OSX guests
  2022-03-04 14:07         ` Cédric Le Goater
@ 2022-03-04 14:18           ` Lucas Mateus Martins Araujo e Castro
  2022-03-04 14:35             ` Cédric Le Goater
  0 siblings, 1 reply; 9+ messages in thread
From: Lucas Mateus Martins Araujo e Castro @ 2022-03-04 14:18 UTC (permalink / raw)
  To: Cédric Le Goater, qemu-ppc, Howard Spoelstra,
	BALATON Zoltan, Fabiano Rosas
  Cc: qemu-devel qemu-devel

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


On 04/03/2022 11:07, Cédric Le Goater wrote:
>
> On 3/4/22 12:08, Lucas Mateus Martins Araujo e Castro wrote:
>>
>> On 02/03/2022 20:55, Fabiano Rosas wrote:
>>> Howard Spoelstra<hsp.cat7@gmail.com>  writes:
>>>
>>>> On Wed, Mar 2, 2022 at 9:11 PM BALATON Zoltan<balaton@eik.bme.hu>  
>>>> wrote:
>>>>
>>>>> On Wed, 2 Mar 2022, Howard Spoelstra wrote:
>>>>>> Hi all,
>>>>>>
>>>>>> I noticed qemu-system-ppc running OSX guests does not get to the 
>>>>>> desktop
>>>>> or
>>>>>> does not display the menu bars.
>>>>> Cc-ing the relevant people and the PPC list might help, I've added 
>>>>> them.
>>>>> Also telling which OSX guest version can reproduce the problem 
>>>>> could help
>>>>> debugging. Is it any OSX version?
>>>>>
>>>>> Regards,
>>>>> BALATON Zoltan
>>>>>
>>>> Oops, Qemu running on Fedora 35 host,
>>>> Reproducer:
>>>>
>>>> ./qemu-system-ppc \
>>>> -M mac99 \
>>>> -m 512 \
>>>> -L pc-bios \
>>>> -display sdl -serial stdio \
>>>> -boot c \
>>>> -drive file=10.1.img,format=raw,media=disk
>>>>
>>>> The issue affects all supported Mac OSX guests: 10.0 to 10.5
>>> Hi Howard,
>>>
>>> Thanks for bisecting this. It seems we inadvertently marked some of the
>>> Vector Multiply instructions to be ISA v2.07 only.
>>>
>>> I can boot Mac OSX 10.4 until the desktop with this fix:
>>>
>>> diff --git a/target/ppc/translate/vmx-impl.c.inc 
>>> b/target/ppc/translate/vmx-impl.c.inc
>>> index f91bee839d..c5d02d13fe 100644
>>> --- a/target/ppc/translate/vmx-impl.c.inc
>>> +++ b/target/ppc/translate/vmx-impl.c.inc
>>> @@ -3141,14 +3141,14 @@ static bool trans_VMULLD(DisasContext *ctx, 
>>> arg_VX *a)
>>>       return true;
>>>   }
>>>
>>> -TRANS_FLAGS2(ALTIVEC_207, VMULESB, do_vx_helper, gen_helper_VMULESB)
>>> -TRANS_FLAGS2(ALTIVEC_207, VMULOSB, do_vx_helper, gen_helper_VMULOSB)
>>> -TRANS_FLAGS2(ALTIVEC_207, VMULEUB, do_vx_helper, gen_helper_VMULEUB)
>>> -TRANS_FLAGS2(ALTIVEC_207, VMULOUB, do_vx_helper, gen_helper_VMULOUB)
>>> -TRANS_FLAGS2(ALTIVEC_207, VMULESH, do_vx_helper, gen_helper_VMULESH)
>>> -TRANS_FLAGS2(ALTIVEC_207, VMULOSH, do_vx_helper, gen_helper_VMULOSH)
>>> -TRANS_FLAGS2(ALTIVEC_207, VMULEUH, do_vx_helper, gen_helper_VMULEUH)
>>> -TRANS_FLAGS2(ALTIVEC_207, VMULOUH, do_vx_helper, gen_helper_VMULOUH)
>>> +TRANS_FLAGS(ALTIVEC, VMULESB, do_vx_helper, gen_helper_VMULESB)
>>> +TRANS_FLAGS(ALTIVEC, VMULOSB, do_vx_helper, gen_helper_VMULOSB)
>>> +TRANS_FLAGS(ALTIVEC, VMULEUB, do_vx_helper, gen_helper_VMULEUB)
>>> +TRANS_FLAGS(ALTIVEC, VMULOUB, do_vx_helper, gen_helper_VMULOUB)
>>> +TRANS_FLAGS(ALTIVEC, VMULESH, do_vx_helper, gen_helper_VMULESH)
>>> +TRANS_FLAGS(ALTIVEC, VMULOSH, do_vx_helper, gen_helper_VMULOSH)
>>> +TRANS_FLAGS(ALTIVEC, VMULEUH, do_vx_helper, gen_helper_VMULEUH)
>>> +TRANS_FLAGS(ALTIVEC, VMULOUH, do_vx_helper, gen_helper_VMULOUH)
>>>   TRANS_FLAGS2(ALTIVEC_207, VMULESW, do_vx_helper, gen_helper_VMULESW)
>>>   TRANS_FLAGS2(ALTIVEC_207, VMULOSW, do_vx_helper, gen_helper_VMULOSW)
>>>   TRANS_FLAGS2(ALTIVEC_207, VMULEUW, do_vx_helper, gen_helper_VMULEUW)
>>> ---
>>>
>>> I'll let Lucas comment on it and we can send a proper patch in the
>>> morning.
>>
>> Checking here it seems I misread the PowerISA appendix and marked 
>> these instructions (vmul[eo].[bh]) as v2.07 even though they are v2.03.
>>
>> This patch seems to correct it and checking here the newer 
>> instructions are correct (v2.07 for vmul[eo].w and v3.1 for 
>> vmul[eo].d), so
>>
>> Reviewed-by: Lucas Mateus Castro<lucas.araujo@eldorado.org.br>
>
>
> Could you please send a proper patch ? The above was given as an example.
>
> Thanks,
>
> C.
>
Yes, this will be added as a proper patch to the fix up patches Matheus 
will send later.

-- 
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: 6918 bytes --]

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

* Re: Issue with qemu-system-ppc running OSX guests
  2022-03-04 14:18           ` Lucas Mateus Martins Araujo e Castro
@ 2022-03-04 14:35             ` Cédric Le Goater
  0 siblings, 0 replies; 9+ messages in thread
From: Cédric Le Goater @ 2022-03-04 14:35 UTC (permalink / raw)
  To: Lucas Mateus Martins Araujo e Castro, qemu-ppc, Howard Spoelstra,
	BALATON Zoltan, Fabiano Rosas
  Cc: qemu-devel qemu-devel

On 3/4/22 15:18, Lucas Mateus Martins Araujo e Castro wrote:
> 
> On 04/03/2022 11:07, Cédric Le Goater wrote:
>>
>> On 3/4/22 12:08, Lucas Mateus Martins Araujo e Castro wrote:
>>>
>>> On 02/03/2022 20:55, Fabiano Rosas wrote:
>>>> Howard Spoelstra<hsp.cat7@gmail.com>  writes:
>>>>
>>>>> On Wed, Mar 2, 2022 at 9:11 PM BALATON Zoltan<balaton@eik.bme.hu>  wrote:
>>>>>
>>>>>> On Wed, 2 Mar 2022, Howard Spoelstra wrote:
>>>>>>> Hi all,
>>>>>>>
>>>>>>> I noticed qemu-system-ppc running OSX guests does not get to the desktop
>>>>>> or
>>>>>>> does not display the menu bars.
>>>>>> Cc-ing the relevant people and the PPC list might help, I've added them.
>>>>>> Also telling which OSX guest version can reproduce the problem could help
>>>>>> debugging. Is it any OSX version?
>>>>>>
>>>>>> Regards,
>>>>>> BALATON Zoltan
>>>>>>
>>>>> Oops, Qemu running on Fedora 35 host,
>>>>> Reproducer:
>>>>>
>>>>> ./qemu-system-ppc \
>>>>> -M mac99 \
>>>>> -m 512 \
>>>>> -L pc-bios \
>>>>> -display sdl -serial stdio \
>>>>> -boot c \
>>>>> -drive file=10.1.img,format=raw,media=disk
>>>>>
>>>>> The issue affects all supported Mac OSX guests: 10.0 to 10.5
>>>> Hi Howard,
>>>>
>>>> Thanks for bisecting this. It seems we inadvertently marked some of the
>>>> Vector Multiply instructions to be ISA v2.07 only.
>>>>
>>>> I can boot Mac OSX 10.4 until the desktop with this fix:
>>>>
>>>> diff --git a/target/ppc/translate/vmx-impl.c.inc b/target/ppc/translate/vmx-impl.c.inc
>>>> index f91bee839d..c5d02d13fe 100644
>>>> --- a/target/ppc/translate/vmx-impl.c.inc
>>>> +++ b/target/ppc/translate/vmx-impl.c.inc
>>>> @@ -3141,14 +3141,14 @@ static bool trans_VMULLD(DisasContext *ctx, arg_VX *a)
>>>>       return true;
>>>>   }
>>>>
>>>> -TRANS_FLAGS2(ALTIVEC_207, VMULESB, do_vx_helper, gen_helper_VMULESB)
>>>> -TRANS_FLAGS2(ALTIVEC_207, VMULOSB, do_vx_helper, gen_helper_VMULOSB)
>>>> -TRANS_FLAGS2(ALTIVEC_207, VMULEUB, do_vx_helper, gen_helper_VMULEUB)
>>>> -TRANS_FLAGS2(ALTIVEC_207, VMULOUB, do_vx_helper, gen_helper_VMULOUB)
>>>> -TRANS_FLAGS2(ALTIVEC_207, VMULESH, do_vx_helper, gen_helper_VMULESH)
>>>> -TRANS_FLAGS2(ALTIVEC_207, VMULOSH, do_vx_helper, gen_helper_VMULOSH)
>>>> -TRANS_FLAGS2(ALTIVEC_207, VMULEUH, do_vx_helper, gen_helper_VMULEUH)
>>>> -TRANS_FLAGS2(ALTIVEC_207, VMULOUH, do_vx_helper, gen_helper_VMULOUH)
>>>> +TRANS_FLAGS(ALTIVEC, VMULESB, do_vx_helper, gen_helper_VMULESB)
>>>> +TRANS_FLAGS(ALTIVEC, VMULOSB, do_vx_helper, gen_helper_VMULOSB)
>>>> +TRANS_FLAGS(ALTIVEC, VMULEUB, do_vx_helper, gen_helper_VMULEUB)
>>>> +TRANS_FLAGS(ALTIVEC, VMULOUB, do_vx_helper, gen_helper_VMULOUB)
>>>> +TRANS_FLAGS(ALTIVEC, VMULESH, do_vx_helper, gen_helper_VMULESH)
>>>> +TRANS_FLAGS(ALTIVEC, VMULOSH, do_vx_helper, gen_helper_VMULOSH)
>>>> +TRANS_FLAGS(ALTIVEC, VMULEUH, do_vx_helper, gen_helper_VMULEUH)
>>>> +TRANS_FLAGS(ALTIVEC, VMULOUH, do_vx_helper, gen_helper_VMULOUH)
>>>>   TRANS_FLAGS2(ALTIVEC_207, VMULESW, do_vx_helper, gen_helper_VMULESW)
>>>>   TRANS_FLAGS2(ALTIVEC_207, VMULOSW, do_vx_helper, gen_helper_VMULOSW)
>>>>   TRANS_FLAGS2(ALTIVEC_207, VMULEUW, do_vx_helper, gen_helper_VMULEUW)
>>>> ---
>>>>
>>>> I'll let Lucas comment on it and we can send a proper patch in the
>>>> morning.
>>>
>>> Checking here it seems I misread the PowerISA appendix and marked these instructions (vmul[eo].[bh]) as v2.07 even though they are v2.03.
>>>
>>> This patch seems to correct it and checking here the newer instructions are correct (v2.07 for vmul[eo].w and v3.1 for vmul[eo].d), so
>>>
>>> Reviewed-by: Lucas Mateus Castro<lucas.araujo@eldorado.org.br>
>>
>>
>> Could you please send a proper patch ? The above was given as an example.
>>
>> Thanks,
>>
>> C.
>>
> Yes, this will be added as a proper patch to the fix up patches Matheus will send later.

We are entering the freeze window. I would rather have one patch per issue please.

Thanks,

C.



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

end of thread, other threads:[~2022-03-04 15:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-02 20:03 Issue with qemu-system-ppc running OSX guests Howard Spoelstra
2022-03-02 20:11 ` BALATON Zoltan
2022-03-02 20:21   ` Howard Spoelstra
2022-03-02 23:55     ` Fabiano Rosas
2022-03-03  5:47       ` Howard Spoelstra
2022-03-04 11:08       ` Lucas Mateus Martins Araujo e Castro
2022-03-04 14:07         ` Cédric Le Goater
2022-03-04 14:18           ` Lucas Mateus Martins Araujo e Castro
2022-03-04 14:35             ` Cédric Le Goater

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.