From: "Zhu, Lingshan" <lingshan.zhu@intel.com>
To: Parav Pandit <parav@nvidia.com>,
"Chen, Jiqian" <Jiqian.Chen@amd.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Cc: "Gerd Hoffmann" <kraxel@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"David Airlie" <airlied@redhat.com>,
"Gurchetan Singh" <gurchetansingh@chromium.org>,
"Chia-I Wu" <olvaffe@gmail.com>,
"Marc-André Lureau" <marcandre.lureau@gmail.com>,
"Robert Beckett" <bob.beckett@collabora.com>,
"Mikhail Golubev-Ciuchea"
<Mikhail.Golubev-Ciuchea@opensynergy.com>,
"virtio-comment@lists.oasis-open.org"
<virtio-comment@lists.oasis-open.org>,
"virtio-dev@lists.oasis-open.org"
<virtio-dev@lists.oasis-open.org>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Deucher, Alexander" <Alexander.Deucher@amd.com>,
"Koenig, Christian" <Christian.Koenig@amd.com>,
"Hildebrand, Stewart" <Stewart.Hildebrand@amd.com>,
"Xenia Ragiadakou" <burzalodowa@gmail.com>,
"Huang, Honglei1" <Honglei1.Huang@amd.com>,
"Zhang, Julia" <Julia.Zhang@amd.com>,
"Huang, Ray" <Ray.Huang@amd.com>
Subject: Re: [virtio-dev] Re: [virtio-comment] Re: [VIRTIO PCI PATCH v5 1/1] transport-pci: Add freeze_mode to virtio_pci_common_cfg
Date: Wed, 20 Sep 2023 15:45:38 +0800 [thread overview]
Message-ID: <1a2537e9-b70c-0d85-20f5-e8ef5c8a9bb8@intel.com> (raw)
In-Reply-To: <PH0PR12MB548118296F71CBD9158963B0DCF9A@PH0PR12MB5481.namprd12.prod.outlook.com>
On 9/20/2023 3:32 PM, Parav Pandit wrote:
>
>> From: Zhu, Lingshan <lingshan.zhu@intel.com>
>> Sent: Wednesday, September 20, 2023 12:58 PM
>>
>> On 9/20/2023 3:10 PM, Parav Pandit wrote:
>>>> From: Zhu, Lingshan <lingshan.zhu@intel.com>
>>>> Sent: Wednesday, September 20, 2023 12:37 PM
>>>>> The problem to overcome in [1] is, resume operation needs to be
>>>>> synchronous
>>>> as it involves large part of context to resume back, and hence just
>>>> asynchronously setting DRIVER_OK is not enough.
>>>>> The sw must verify back that device has resumed the operation and
>>>>> ready to
>>>> answer requests.
>>>> this is not live migration, all device status and other information
>>>> still stay in the device, no need to "resume" context, just resume running.
>>>>
>>> I am aware that it is not live migration. :)
>>>
>>> "Just resuming" involves lot of device setup task. The device implementation
>> does not know for how long a device is suspended.
>>> So for example, a VM is suspended for 6 hours, hence the device context
>> could be saved in a slow disk.
>>> Hence, when the resume is done, it needs to setup things again and driver got
>> to 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.
> Which is the signal to trigger the restore? Which is the trigger in physical device when there is no hypervisor?
>
> In my view, setting the DRIVER_OK is the signal regardless of hypervisor or physical device.
> Hence the re-read is must.
Yes, as I said below, should verify by re-read.
>
>> And the hypervisor/driver needs to check the device status by re-reading.
>>>> Like resume from a failed LM.
>>>>> This is slightly different flow than setting the DRIVER_OK for the
>>>>> first time
>>>> device initialization sequence as it does not involve large restoration.
>>>>> So, to merge two ideas, instead of doing DRIVER_OK to resume, the
>>>>> driver
>>>> should clear the SUSPEND bit and verify that it is out of SUSPEND.
>>>>> 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
>>>>
>>> Yes, this is why either DRIER_OK validation by the driver is needed or Jiqian's
>> synchronous new register..
>> so re-read
> Yes. re-read until set, Thanks.
>
next prev parent reply other threads:[~2023-09-20 7:46 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-19 11:42 [VIRTIO PCI PATCH v5 0/1] Add freeze_mode to virtio_pci_common_cfg Jiqian Chen
2023-09-19 11:42 ` [VIRTIO PCI PATCH v5 1/1] transport-pci: " Jiqian Chen
2023-09-19 12:10 ` Parav Pandit
2023-09-19 14:09 ` Michael S. Tsirkin
2023-09-20 3:57 ` [virtio-dev] " Chen, Jiqian
2023-09-20 4:10 ` Parav Pandit
2023-09-19 12:31 ` Michael S. Tsirkin
2023-09-20 4:56 ` Chen, Jiqian
2023-09-20 5:59 ` [virtio-comment] " Zhu, Lingshan
2023-09-20 6:33 ` [virtio-dev] " Chen, Jiqian
2023-09-20 6:58 ` Parav Pandit
2023-09-20 7:06 ` Zhu, Lingshan
2023-09-20 7:10 ` Parav Pandit
2023-09-20 7:27 ` Zhu, Lingshan
2023-09-20 7:32 ` Parav Pandit
2023-09-20 7:45 ` Zhu, Lingshan [this message]
2023-09-20 7:47 ` Parav Pandit
2023-09-20 7:24 ` Chen, Jiqian
2023-09-20 7:30 ` Zhu, Lingshan
2023-09-20 7:35 ` Parav Pandit
2023-09-20 7:47 ` Zhu, Lingshan
2023-09-20 7:51 ` Parav Pandit
2023-09-20 7:55 ` Zhu, Lingshan
2023-09-20 7:53 ` Chen, Jiqian
2023-09-20 7:56 ` Parav Pandit
2023-09-20 8:18 ` [virtio-comment] " Chen, Jiqian
2023-09-20 6:58 ` Zhu, Lingshan
2023-09-20 7:17 ` [virtio-comment] " Chen, Jiqian
2023-09-20 7:42 ` Zhu, Lingshan
2023-09-21 4:22 ` Jason Wang
2023-09-21 6:28 ` [virtio-dev] " Chen, Jiqian
2023-09-22 3:17 ` Jason Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1a2537e9-b70c-0d85-20f5-e8ef5c8a9bb8@intel.com \
--to=lingshan.zhu@intel.com \
--cc=Alexander.Deucher@amd.com \
--cc=Christian.Koenig@amd.com \
--cc=Honglei1.Huang@amd.com \
--cc=Jiqian.Chen@amd.com \
--cc=Julia.Zhang@amd.com \
--cc=Mikhail.Golubev-Ciuchea@opensynergy.com \
--cc=Ray.Huang@amd.com \
--cc=Stewart.Hildebrand@amd.com \
--cc=airlied@redhat.com \
--cc=bob.beckett@collabora.com \
--cc=burzalodowa@gmail.com \
--cc=gurchetansingh@chromium.org \
--cc=jasowang@redhat.com \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcandre.lureau@gmail.com \
--cc=mst@redhat.com \
--cc=olvaffe@gmail.com \
--cc=parav@nvidia.com \
--cc=qemu-devel@nongnu.org \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=virtio-comment@lists.oasis-open.org \
--cc=virtio-dev@lists.oasis-open.org \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).