qemu-ppc
[Top][All Lists]
Advanced

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

Re: Multiple CPU for PPC virtual machine on x86_64 host


From: Daniel Henrique Barboza
Subject: Re: Multiple CPU for PPC virtual machine on x86_64 host
Date: Fri, 5 Aug 2022 13:39:27 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0



On 8/2/22 19:19, BERBAR Florian wrote:
Hello everyone,

I am working on 32 bit PPC systems on a qemu-ppc based virtual system but I 
have not been able to boot my virtual machine with multiple CPUs.

My host has the following versions:
- Linux version 5.10.0-15-amd64 (debian-kernel@lists.debian.org) (gcc-10 
(Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1 
SMP Debian 5.10.120-1 (2022-06-09)
- QEMU emulator version 5.2.0 (Debian 1:5.2+dfsg-11+deb11u2)
Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers

First, I tried to set the -smp option with the number of CPUs with the 
following command but the default machine type (g3beige) does not support more 
than one core.

$ qemu-system-ppc -m 2047M -smp 4 -hda -cdrom 
install-powerpc-minimal-20220122T062244Z.iso -boot d
qemu-system-ppc: Invalid SMP CPUs 4. The max CPUs supported by machine 
'g3beige' is 1


Then I also tried to change the machine type based on the list in the help 
output

$ qemu-system-ppc -M help
Supported machines are:
40p                  IBM RS/6000 7020 (40p)
bamboo               bamboo
g3beige              Heathrow based PowerMAC (default)
mac99                Mac99 based PowerMAC
mpc8544ds            mpc8544ds
none                 empty machine
ppce500              generic paravirt e500 platform
ref405ep             ref405ep
sam460ex             aCube Sam460ex
taihu                taihu
virtex-ml507         Xilinx Virtex ML507 reference design

The mpc8544ds machine is able to boot with 2 CPUs:

qemu-system-ppc -m 1G -M mpc8544ds -kernel 
./buildroot/qemu_ppc_mpc8544ds-latest/vmlinux \
-net nic,model=e1000 -net user -serial mon:stdio \
-nographic -snapshot -smp 2

This line brings me up to the login prompt.

I can get a e500 guest started with 2 CPUs, but the boot hangs when the
kernel tries to start the second CPU:

qemu-system-ppc -m 1G -M ppce500 -cpu e500mc \
-kernel ./buildroot/qemu_ppc_e500mc-latest/uImage -append "root=/dev/vda" \
-drive file=./buildroot/qemu_ppc_e500mc-latest/rootfs.ext2,if=virtio,format=raw 
\
-net nic,model=virtio-net-pci -net user -serial mon:stdio -nographic -snapshot \
-smp 2

e500 family performance monitor hardware support registered
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
(... hangs indefinitely here ...)

So unless you want to debug why this is happening I guess you can stick with
the mpc8544ds machine.


If you want to give it a try by yourself, the kernel and disk images I used 
above
can be found in this repo:

https://github.com/legoater/qemu-ppc-boot



Then I also tried to change the machine type based on the list in the help 
output

The mpc8544ds and ppce500 machines give me the "QEMU 5.2.0 monitor" prompt 
right after starting but I don't really understand why...


This happens because you didn't redirect the serial console of the machine
to the terminal. What you're seeing is the QEMU monitor console.

You can redirect the VM output to the terminal by adding

"-serial mon:stdio -nographic"

In the command line.


Thanks,


Daniel


Could someone help me to start a PPC virtual machine with more than one CPU?






Thank you very much

Florian




reply via email to

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