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:06:33 +0800 [thread overview]
Message-ID: <701bb67c-c52d-4eb3-a6ed-f73bd5d0ff33@intel.com> (raw)
In-Reply-To: <PH0PR12MB5481D2CBCFBF7BCBF427EE1EDCF9A@PH0PR12MB5481.namprd12.prod.outlook.com>
On 9/20/2023 2:58 PM, Parav Pandit wrote:
>> From: Chen, Jiqian <Jiqian.Chen@amd.com>
>> Sent: Wednesday, September 20, 2023 12:03 PM
>> If driver write 0 to reset device, can the SUSPEND bit be cleared?
> It must as reset operation, resets everything else and so the suspend too.
>
>> (pci_pm_resume->virtio_pci_restore->virtio_device_restore-
>>> virtio_reset_device)
>> If SUSPEND is cleared, then during the reset process in Qemu, I can't judge if
>> the reset request is from guest restore process or not, and then I can't change
>> the reset behavior.
> Reset should not be influenced by suspend.
> Suspend should do the work of suspend and reset to do the reset.
>
> 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.
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
next prev parent reply other threads:[~2023-09-20 7:07 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 [this message]
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
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=701bb67c-c52d-4eb3-a6ed-f73bd5d0ff33@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).