qemu-devel
[Top][All Lists]
Advanced

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

Re: Issue with qemu-system-ppc running OSX guests


From: Cédric Le Goater
Subject: Re: Issue with qemu-system-ppc running OSX guests
Date: Fri, 4 Mar 2022 15:07:08 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]