On Thu, Jul 16, 2026 at 06:22:07PM -0700, Yanjun.Zhu wrote:
> 
> On 7/16/26 4:24 PM, Yanjun.Zhu wrote:
> > 
> > 
> > On 7/14/26 8:14 AM, Vipin Sharma wrote:
> > > Testing
> > > -------
> > > 
> > > Tested using VFIO Live Update selftests in both QEMU and bare-metal
> > > environment (Intel DSA PCIe device).
> > 
> > I want to make tests VFIO Live Update selftests in QEMU. But how to
> > select a PCIe device?
> > 
> > what device do the PCI ID 0000:00:04.0 and 0000:6a:01.0 mean in the
> > following testcase?

Sorry, this was my copy-paste mistake when combining things from both
qemu and baremetal. You only need one device not two separate ones.

For testing using QEMU, you can use QEMU PCI test device.

  -device pci-testdev

In VM, use `lspci` command to find the BDF of the PCI device. It will show
output like:

  00:04.0 Unclassified device [00ff]: Red Hat, Inc. QEMU PCI Test Device

Then prefix the domain (generally, 0000) to the BDF and use the testing
commands.

`0000:6a:01.0` was the BDF of the Intel DSA device on my host. I
incorrectly mixed two devices during my copy-paste.

Limitation of qemu pci-testdev is that it does not have the DMA
capability. I used physical host with Intel DSA to verify that the
device performing DMA during live update gets reset.

> > 
> In my qemu,
> 
> 00:04.0 System peripheral: InnoTek Systemberatung GmbH VirtualBox Guest
> Service
>     Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx-
>     Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort-
> <MAbort- >SERR- <PERR- INTx-
>     Interrupt: pin A routed to IRQ 20
>     Region 0: I/O ports at d040 [size=32]
>     Region 1: Memory at f0400000 (32-bit, non-prefetchable) [size=4M]
>     Region 2: Memory at f0800000 (32-bit, prefetchable) [size=16K]
>     Kernel driver in use: vboxguest
>     Kernel modules: vboxguest
> 
> I am wondering if the above pci device can work well with this patch set or
> not.

I think you should be able to test Live Update with any PCI device which
can be attached vfio-pci driver. 

`vfio_pci_liveupdate_kexec_test` will initiate DMA if the VFIO selftest
framework has the driver for the passed device (Intel DSA) otherwise it
will just skip over the DMA flow and do the remaining things.

Let me know if you still face some issue in running Live Update, I will
be happy to provide more details.

Thanks
Vipin

Reply via email to