Re: [PATCH v4 0/2] Add QEMU virt-ctrl driver and update m68k virt
Geert Uytterhoeven <[email protected]>
| Newsgroups | org.kernel.vger.linux-m68k,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm |
|---|---|
| Message-ID | <CAMuHMdW6ZqQbofuXb7s6TpDWkyj4yDR-gvOVHVn0FfAahV8V4g@mail.gmail.com> |
Hi Kuan-Wei, On Sun, 12 Apr 2026 at 23:20, Kuan-Wei Chiu <[email protected]> wrote: > Introduce a generic platform driver for the QEMU 'virt-ctrl' device [1] > and transitions the m68k 'virt' machine to use it, replacing > architecture-specific hooks. > > The new driver ('qemu-virt-ctrl') registers a restart handler and > populates the global 'pm_power_off' callback. > > On the m68k side, the platform initialization is updated to register > the 'qemu-virt-ctrl' platform device. Additionally, the 'mach_reset' > hook is bridged to 'do_kernel_restart()' to ensure the kernel's restart > handler chain is correctly invoked. > > Verified on QEMU m68k virt. Both system reset and power-off were > confirmed functional by invoking 'reboot(LINUX_REBOOT_CMD_RESTART)', > 'reboot(LINUX_REBOOT_CMD_POWER_OFF)', and > 'reboot(LINUX_REBOOT_CMD_HALT)' from userspace. > > Link: https://gitlab.com/qemu-project/qemu/-/blob/v10.2.0/hw/misc/virt_ctrl.c [1] > --- > Changes in v4: > - Fix sparse warning caught by kernel test robot. > - Pass the struct qemu_virt_ctrl context to sys-off handlers instead of > the __iomem pointer. Thanks I replaced v3 with v4 in my queue in the m68k tree for v7.1, and will postpone my PR by a few days to give it some coverage in linux-next. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds