Hi Heinrich,

On 2026-10-07T19:09:05, Heinrich Schuchardt
<[email protected]> wrote:

> Currently we only support reset but not poweroff on x86 QEMU.

I agree with where you and Bin ended up: keep the existing x86_reset
driver so efi_reset_system() keeps working. But I think we can go
further and avoid a new driver entirely. The existing driver already
handles SYSRESET_POWER_OFF: pch_sysreset_power_off() asks the PCH for
its PM-block layout with PCH_REQ_PMBASE_INFO and writes SLP_TYP_S5 /
SLP_EN itself. The QEMU devicetrees already have PCH nodes
('intel,pch7' on i440fx, 'intel,pch9' on q35), but neither pch7.c nor
pch9.c implements that ioctl, so the request fails today. If those
drivers (or QEMU-specific variants) returned the PM base and offsets,
poweroff would work through the existing path. That needs no new
driver, compatible strings, undocumented 'intel,*' properties, DT
nodes or 'imply SYSRESET_X86 if !QEMU' change, and the EFI reset path
stays as it is.

What do you think?

Since this is a user-visible feature, please can you also update
doc/board/emulation/qemu-x86.rst to say that poweroff is supported?
Please also add a test if possible, e.g. a pytest that runs poweroff
on qemu-x86 in CI.

Regards,
Simon

Reply via email to