I am using libvfio-user to model a PCI device for QEMU. Occasionally, the PCI 
device model process gets preempted by the host, resulting in the kernel driver 
running in QEMU thinking that the device has timed out. The kernel driver then 
begins timeout recovery logic, only for the host to resume the PCI device model 
process. This results in a non-sensical PCI device state within the kernel 
driver.
I think the correct solution to this is to harden the timeout logic in the 
kernel driver code, but I was wondering if there is a way to have QEMU pend for 
vfio device operations rather than asynchronously continue kernel execution. A 
single iowrite32() call in a kernel driver would realistically never take such 
an excessive amount of time to complete that it would cause a driver timeout.

Reply via email to