public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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:27:30 +0800	[thread overview]
Message-ID: <91c3e7ec-d702-ee61-c420-59ddc8dac6dc@intel.com> (raw)
In-Reply-To: <PH0PR12MB5481891053E37A79920991F6DCF9A@PH0PR12MB5481.namprd12.prod.outlook.com>



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.
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
>


  reply	other threads:[~2023-09-20  7:27 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 [this message]
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=91c3e7ec-d702-ee61-c420-59ddc8dac6dc@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