[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACGkMEv4eq9Ej2d2vKp0S8UdTgf4tjXJ_SAtfZmKxQ3iPxfEOg@mail.gmail.com>
Date: Fri, 8 Nov 2024 10:53:49 +0800
From: Jason Wang <jasowang@...hat.com>
To: "Michael S. Tsirkin" <mst@...hat.com>
Cc: qiang4.zhang@...ux.intel.com, Paolo Bonzini <pbonzini@...hat.com>,
Stefan Hajnoczi <stefanha@...hat.com>, Eugenio Pérez <eperezma@...hat.com>,
Xuan Zhuo <xuanzhuo@...ux.alibaba.com>, Jens Axboe <axboe@...nel.dk>,
Olivia Mackall <olivia@...enic.com>, Herbert Xu <herbert@...dor.apana.org.au>,
Amit Shah <amit@...nel.org>, Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Gonglei <arei.gonglei@...wei.com>,
"David S. Miller" <davem@...emloft.net>, Viresh Kumar <viresh.kumar@...aro.org>,
"Chen, Jian Jun" <jian.jun.chen@...el.com>, Andi Shyti <andi.shyti@...nel.org>,
Andrew Lunn <andrew+netdev@...n.ch>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
"James E.J. Bottomley" <James.Bottomley@...senpartnership.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>, David Hildenbrand <david@...hat.com>,
Gerd Hoffmann <kraxel@...hat.com>, Anton Yakovlev <anton.yakovlev@...nsynergy.com>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>, Qiang Zhang <qiang4.zhang@...el.com>,
virtualization@...ts.linux.dev, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
linux-i2c@...r.kernel.org, netdev@...r.kernel.org, linux-scsi@...r.kernel.org,
linux-sound@...r.kernel.org
Subject: Re: [PATCH v2] virtio: only reset device and restore status if needed
in device resume
On Wed, Nov 6, 2024 at 5:29 PM Michael S. Tsirkin <mst@...hat.com> wrote:
>
> On Fri, Nov 01, 2024 at 10:11:11AM +0800, Jason Wang wrote:
> > On Fri, Nov 1, 2024 at 9:54 AM <qiang4.zhang@...ux.intel.com> wrote:
> > >
> > > From: Qiang Zhang <qiang4.zhang@...el.com>
> > >
> > > Virtio core unconditionally reset and restore status for all virtio
> > > devices before calling restore method. This breaks some virtio drivers
> > > which don't need to do anything in suspend and resume because they
> > > just want to keep device state retained.
> >
> > The challenge is how can driver know device doesn't need rest.
>
> I actually don't remember why do we do reset on restore. Do you?
>
Because the driver doesn't know if the device can keep its state, so
it chooses to start from that.
Thanks
Powered by blists - more mailing lists