Yes, as I said below, should verify by re-read.
From: Zhu, Lingshan <lingshan.zhu@xxxxxxxxx>Which is the signal to trigger the restore? Which is the trigger in physical device when there is no hypervisor?
Sent: Wednesday, September 20, 2023 12:58 PM
On 9/20/2023 3:10 PM, Parav Pandit wrote:
does not know for how long a device is suspended.From: Zhu, Lingshan <lingshan.zhu@xxxxxxxxx>I am aware that it is not live migration. :)
Sent: Wednesday, September 20, 2023 12:37 PM
The problem to overcome in [1] is, resume operation needs to beas it involves large part of context to resume back, and hence just
synchronous
asynchronously setting DRIVER_OK is not enough.
The sw must verify back that device has resumed the operation andanswer requests.
ready to
this is not live migration, all device status and other information
still stay in the device, no need to "resume" context, just resume running.
"Just resuming" involves lot of device setup task. The device implementation
So for example, a VM is suspended for 6 hours, hence the device contextcould be saved in a slow disk.
Hence, when the resume is done, it needs to setup things again and driver gotto verify before accessing more from the device.
The restore procedures should perform by the hypervisor and done before set
DRIVER_OK and wake up the guest.
In my view, setting the DRIVER_OK is the signal regardless of hypervisor or physical device.
Hence the re-read is must.
And the hypervisor/driver needs to check the device status by re-reading.Yes. re-read until set, Thanks.
synchronous new register..Like resume from a failed LM.Yes, this is why either DRIER_OK validation by the driver is needed or Jiqian's
This is slightly different flow than setting the DRIVER_OK for thedevice initialization sequence as it does not involve large restoration.
first time
So, to merge two ideas, instead of doing DRIVER_OK to resume, theshould clear the SUSPEND bit and verify that it is out of SUSPEND.
driver
Because driver is still in _OK_ driving the device flipping the SUSPEND bit.Please read the spec, it says:
The driver MUST NOT clear a device status bit
so re-read