On 11/5/26 12:14, Chinmay Rath wrote:
On 11/3/26 19:49, Anushree Mathur wrote:
Add a functional test that hot-plugs and hot-unplugs a virtio-blk-pci
disk on the pseries machine. It runs with TCG, and also with KVM if
KVM is enabled.
On pseries a PCI device added through QMP is only enumerated by the
guest once rtas_errd (ppc64-diag) handles the RTAS hotplug event and
runs drmgr (powerpc-utils). Neither is in the buildroot image used by
the other pseries tests, so the test uses rootfs-hotplug.ext2: the same
image with those two tools added.
The test boots with a second PHB (phb1) present so that the guest
registers its slots, adds a null-co backend, hot-plugs virtio-blk-pci
into phb1.0 and waits for /dev/vda, then unplugs it and waits for both
the QMP DEVICE_DELETED event and /dev/vda to go away. The root drive is
used with snapshot=on so the cached asset is not modified by the guest.
Signed-off-by: Anushree Mathur <[email protected]>
---
Hi all,
This adds a functional test for virtio-blk hotplug on the pseries
machine, with a TCG and a KVM variant.
The test boots pseries with a second PCI host bridge (phb1) present at
boot, hot-plugs a virtio-blk-pci device into it over QMP, and waits for
/dev/vda to show up in the guest. It then unplugs the device and waits
for the DEVICE_DELETED event and for /dev/vda to disappear again.
On pseries the guest does not enumerate a hot-plugged PCI device by
itself: rtas_errd (ppc64-diag) has to handle the RTAS hotplug event and
run drmgr (powerpc-utils). The buildroot image the other pseries tests
use has neither, so the test needs a rootfs that includes them.
I am sending this as an RFC because that rootfs is not available yet.
It is a new file, rootfs-hotplug.ext2, which I proposed for the
qemu-ppc-boot repository next to the existing pseries images:
https://github.com/legoater/qemu-ppc-boot/pull/5
Hi Cedric,
I heard from Anushree that you do not plan to accept PRs in the above
repository going forward.
If you're okay with it, I'd like to fork your repository and maintain
Sure. please do !
it for future PPC test development and usage.
Please let me know if that works for you.
Thanks,
C.