All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Lindsay Ryan" <Ryan.Lindsay@petermac.org>,
	"qemu-discuss@nongnu.org" <qemu-discuss@nongnu.org>
Cc: qemu-ppc <qemu-ppc@nongnu.org>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: need help with my config
Date: Fri, 30 Jul 2021 18:50:35 +0200	[thread overview]
Message-ID: <39f8272b-2c2f-08d6-1fb5-cd519fdf2bbd@kaod.org> (raw)
In-Reply-To: <82ae0532-50c2-7a67-af16-04226cb2986b@redhat.com>

Hello,

On 7/30/21 3:25 PM, Philippe Mathieu-Daudé wrote:
> Cc'ing qemu-ppc@
> 
> On 7/30/21 6:25 AM, Lindsay Ryan wrote:
>> Hi
>> I'm trying to emulate some physical IBM Power 9's that we have. There
>> seems to be plenty of examples of using x86_64 qemu, but slightly less
>> for Power. 

For baremetal emulation, please use the PowerNV machine. See this page : 

  https://qemu.readthedocs.io/en/latest/system/ppc/powernv.html

HW is not fully emulated but QEMU has enough support to start a multichip
system running any distro.  

>> Unless it's specifically for installing AIX

AIX only runs under the pseries machine (virtualized) and not on baremetal. 

>> Anyway, I'm trying to boot the VM as I guess a bare metal Power 9 box,
>> then install redhat from Iso on a disk and have it on the network.
>>
>> ./qemu-system-ppc64 -cpu POWER9 -smp cpus=4 -machine pseries -m 4096 -M
>> accel=tcg  -serial stdio -nodefaults -nographic -device
>> megasas,id=scsi0,bus=pci.0,addr=0x5 -drive
>> file=/home/hdisk1.qcow2,if=none,id=drive-scsi0-0-0-0,format=qcow2,cache=none
>> -device
>> scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=2
>> -cdrom /mnt/images/rhel-8.4-ppc64le-boot.iso -monitor
>> telnet:0.0.0.0:3344,server,nowait -netdev
>> bridge,id=net0,helper=qemu-bridge-helper,br=bridge0,id=hostnet0

This is a pseries machine (virtualized) and not baremetal.

Which machine do you want to run ? pseries is the VM platform as run by KVM, 
It can run under TCG also. PowerNV is the baremetal platform on which KVM 
runs using the OPAL firmware. QEMU only has a PowerNV emulator, so TCG. 

These are two very different PPC machines.

>> So the megasas gets detected as a raid controller. Yay. 
>> But my qcow2 disk image doesn't seem to be plugged into it correctly as
>> it's not detected. 
>> It sees the cdrom image and I can boot from it.
>> The other thing I can't get working is the network card. 

because you don't have any :) Add a device and link it to the netdev.


That's how I run a TCG pseries POWER9 machine on my x86 laptop:

qemu-system-ppc64 -M pseries,cap-cfpc=workaround,cap-sbbc=workaround,cap-ibs=workaround,cap-ccf-assist=on,ic-mode=dual -m 4G -accel tcg,thread=multi -cpu POWER9 -smp 4,cores=4,maxcpus=8,threads=1 -device virtio-net-pci,netdev=net0,mac=C0:FF:EE:00:00:02,bus=pci.0,addr=0x2 -netdev tap,id=net0,helper=/usr/libexec/qemu-bridge-helper,br=virbr0,vhost=on -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x1 -drive file=./ubuntu-ppc64le.qcow2,if=none,id=drive-scsi0-0-0-0,format=qcow2,cache=none -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1 -device qemu-xhci,id=usb,bus=pci.0,addr=0x4 -nographic -nodefaults -serial mon:stdio    

and a PowerNV POWER9 machine :

qemu-system-ppc64 -m 4G -machine powernv9 -smp 2 -accel tcg,thread=multi -kernel ./open-power/images/witherspoon-latest/zImage.epapr -initrd ./open-power/images/witherspoon-latest/rootfs.cpio.xz -bios ./open-power/images/witherspoon-latest/skiboot.lid -device pcie-pci-bridge,id=bridge1,bus=pcie.1,addr=0x0 -device ich9-ahci,id=sata0,bus=pcie.0,addr=0x0 -drive file=./ubuntu-ppc64le-powernv.qcow2,if=none,id=drive0,format=qcow2,cache=none -device ide-hd,bus=sata0.0,unit=0,drive=drive0,id=ide,bootindex=1 -device e1000e,netdev=net0,mac=C0:FF:EE:00:01:03,bus=bridge1,addr=0x3 -netdev bridge,helper=/usr/libexec/qemu-bridge-helper,br=virbr0,id=net0 -device nec-usb-xhci,bus=bridge1,addr=0x2 -device usb-storage,drive=usbkey -drive file=./usb.img,if=none,id=usbkey,format=raw,cache=none -serial mon:stdio -nographic

You will need firmware images for the latter.


Cheers,
C.


  parent reply	other threads:[~2021-07-30 16:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <MEYP282MB168775224F9A7690C9F5AEF9F9EC9@MEYP282MB1687.AUSP282.PROD.OUTLOOK.COM>
2021-07-30 13:25 ` need help with my config Philippe Mathieu-Daudé
2021-07-30 15:09   ` Klaus Kiwi
2021-07-30 16:50   ` Cédric Le Goater [this message]
2021-08-02 23:22     ` Lindsay Ryan
2021-08-03  7:52       ` Cédric Le Goater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39f8272b-2c2f-08d6-1fb5-cd519fdf2bbd@kaod.org \
    --to=clg@kaod.org \
    --cc=Ryan.Lindsay@petermac.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-discuss@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.