[Top][All Lists]

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

Re: [PATCH v2] ppc/pnv: Create BMC devices at machine init

From: Nathan Chancellor
Subject: Re: [PATCH v2] ppc/pnv: Create BMC devices at machine init
Date: Sat, 4 Apr 2020 00:17:07 -0700
User-agent: Mutt/1.9.4 (2018-02-28)

Hi Cédric,

On Thu, Nov 21, 2019 at 05:23:40PM +0100, Cédric Le Goater wrote:
> The BMC of the OpenPOWER systems monitors the machine state using
> sensors, controls the power and controls the access to the PNOR flash
> device containing the firmware image required to boot the host.
> QEMU models the power cycle process, access to the sensors and access
> to the PNOR device. But, for these features to be available, the QEMU
> PowerNV machine needs two extras devices on the command line, an IPMI
> BT device for communication and a BMC backend device:
>   -device ipmi-bmc-sim,id=bmc0 -device isa-ipmi-bt,bmc=bmc0,irq=10
> The BMC properties are then defined accordingly in the device tree and
> OPAL self adapts. If a BMC device and an IPMI BT device are not
> available, OPAL does not try to communicate with the BMC in any
> manner. This is not how real systems behave.
> To be closer to the default behavior, create an IPMI BMC simulator
> device and an IPMI BT device at machine initialization time. We loose
> the ability to define an external BMC device but there are benefits:
>   - a better match with real systems,
>   - a better test coverage of the OPAL code,
>   - system powerdown and reset commands that work,
>   - a QEMU device tree compliant with the specifications (*).
> (*) Still needs a MBOX device.
> Signed-off-by: Cédric Le Goater <address@hidden>

I just started testing QEMU v5.0.0-rc1 against the little Linux booting
framework that I helped set up for ClangBuiltLinux and this commit has
caused some problems because we specify the exact same devices as you
note in the commit message:


$ timeout 3m unbuffer qemu-system-ppc64 -device ipmi-bmc-sim,id=bmc0 \
                                        -device isa-ipmi-bt,bmc=bmc0,irq=10 \
                                        -L images/ppc64le/ \
                                        -bios skiboot.lid \
                                        -machine powernv \
                                        -display none \
                                        -initrd images/ppc64le/rootfs.cpio \
                                        -kernel zImage.epapr \
                                        -m 2G \
                                        -serial mon:stdio
qemu-system-ppc64: error creating device tree: node: FDT_ERR_EXISTS

It seems to me like if the machine is silently creating these devices,
it should just warn that the user is trying to create a device that
already exists? If not, then I assume I will just need to hack up a
check for QEMU 5.0.0+ and just not add those devices? We use that script
with QEMU 3.1.0 in our CI and I use it locally with QEMU 4.2.0 so
universally getting rid of them doesn't seem logical.

Curious for your thoughts on what to do and cheers,

reply via email to

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