Received: from eggs.gnu.org ([2001:4830:134:3::10]:55413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfpRq-0000og-A7 for qemu-devel@nongnu.org; Fri, 02 Sep 2016 10:28:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfpRp-0007Yh-3f for qemu-devel@nongnu.org; Fri, 02 Sep 2016 10:28:02 -0400 From: Programmingkid Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Fri, 2 Sep 2016 10:27:52 -0400 Message-Id: <7D2DD011-6985-47EF-9950-8763102115BA@gmail.com> Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH RFC 0/4] Enable MTTCG on PowerPC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nikunj A Dadhania , "list@suse.de:PowerPC list:PowerPC" , =?iso-8859-1?Q?Alex_Benn=E9e?= , David Gibson , rth@twiddle.net, qemu-devel qemu-devel > On 09/02/2016 08:32 AM, Nikunj A Dadhania wrote: >> The series is a first attempt at enabling Multi-Threaded TCG on = PowerPC. >> Changes that were needed to enable PowerPC are pretty simple; >>=20 >> Patch 01: Take a iothread lock during hcall, as hcall can generate io = requests >> 02: For TCG, we were harcoding smt as 1, this gets rid of the = limitation >> 03: Use atomic_cmpxchg in store conditional >> 04: With more threads, flush the entry from each cpu.=20 >> This can be optimized further. >>=20 >> The patches are based on the Alex Bennee's base enabling patches for=20= >> MTTCG[1] and Emilios's cmpxchg atomics. The consolidated tree of the=20= >> above patches is here: >>=20 >> = https://github.com/stsquad/qemu/tree/mttcg/base-patches-v4-with-cmpxchg-at= omics-v2 >>=20 >> Apart from the above, PPC patches are based out of ppc-for-2.8 and=20 >> load/store consolidation patches [2] >>=20 >> Series with all dependent patches available here:=20 >> https://github.com/nikunjad/qemu/tree/ppc_mttcg_v1 >>=20 >> Testing:=20 >> =3D=3D=3D=3D=3D=3D=3D=3D >>=20 >> -smp 4,cores=3D1,threads=3D4 -accel tcg,thread=3Dmulti >>=20 >> TODO >> =3D=3D=3D=3D >> Implement msgsndp instructions(door-bell), newer kernels enable it=20 >> depending on the PVR. I have been using following workaround to boot. >> = https://github.com/nikunjad/qemu/commit/2c10052c5f93418a6b920e6ba3ce1813fc= f50bc4 >=20 > You could also introduce a Power8 DD1 in qemu. =46rom the kernel = cputable : >=20 > { /* Power8 DD1: Does not support doorbell IPIs */ > .pvr_mask =3D 0xffffff00, > .pvr_value =3D 0x004d0100, > .cpu_name =3D "POWER8 (raw)", > .cpu_features =3D CPU_FTRS_POWER8_DD1, > ... >=20 > Cheers, > C. What I did: git clone https://github.com/nikunjad/qemu/tree/ppc_mttcg_v1 git checkout ppc_mttcg_v1 ./configure --target-list=3Dppc-softmmu,i386-softmmu --cxx=3Dgcc-4.9 = --cc=3Dgcc-4.9 --objcc=3Dgcc-4.9 --disable-gtk --disable-sdl && make After these steps I tried to test Windows XP and Windows 2000 using this = command line: ./i386-softmmu/qemu-system-i386 -name 'Windows XP' -hda 'Windows XP Hard = Drive.img' -boot c -smp 4,cores=3D1,threads=3D4 -accel tcg,thread=3Dmulti This causes QEMU to crash. The cause is an abort trap. This is what I = captured: Thread 7 Crashed: 0 libSystem.B.dylib 0x00007fff825559ce = __semwait_signal_nocancel + 10 1 libSystem.B.dylib 0x00007fff825558d0 = nanosleep$NOCANCEL + 129 2 libSystem.B.dylib 0x00007fff825b23ce = usleep$NOCANCEL + 57 3 libSystem.B.dylib 0x00007fff825d1a00 abort + 93 4 qemu-system-i386 0x0000000100036c65 = qemu_tcg_cpu_thread_fn + 325 (cpus.c:1384) 5 libSystem.B.dylib 0x00007fff8251bfd6 = _pthread_start + 331 6 libSystem.B.dylib 0x00007fff8251be89 thread_start = + 13 Trying Windows 2000 also causes the same crash. I then tried Mac OS 10.4. The command line was: ./ppc-softmmu/qemu-system-ppc -smp 4,cores=3D1,threads=3D4 -M mac99 -m = 512 -hda 'Mac OS 10.4.0.qcow2' -boot c -prom-env boot-args=3D-v = -localtime The result was this error message: qemu-system-ppc: Number of SMP CPUs requested (4) exceeds max CPUs = supported by machine 'mac99' (1) I then tried using https://github.com/stsquad/qemu.git. The errors I see = is this: qemu-system-i386: -accel: invalid option qemu-system-ppc: Number of SMP CPUs requested (4) exceeds max CPUs = supported by machine 'mac99' (1) I used the same command lines as above. My info: Host operating system: Mac OS 10.6.8 GCC 4.9