All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Halil Pasic <pasic@linux.ibm.com>,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] virtio: acknowledge all features before access
Date: Mon, 17 Jan 2022 13:38:42 +0100	[thread overview]
Message-ID: <87mtjuv8od.fsf@redhat.com> (raw)
In-Reply-To: <20220117032429-mutt-send-email-mst@kernel.org>

On Mon, Jan 17 2022, "Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Mon, Jan 17, 2022 at 02:31:49PM +0800, Jason Wang wrote:
>> 
>> 在 2022/1/15 上午4:09, Michael S. Tsirkin 写道:
>> > @@ -495,6 +494,10 @@ int virtio_device_restore(struct virtio_device *dev)
>> >   	/* We have a driver! */
>> >   	virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER);
>> > +	ret = dev->config->finalize_features(dev);
>> > +	if (ret)
>> > +		goto err;
>> 
>> 
>> Is this part of code related?
>> 
>> Thanks
>> 
>
> Yes. virtio_finalize_features no longer calls dev->config->finalize_features.
>
> I think the dev->config->finalize_features callback is actually
> a misnomer now, it just sends the features to device,
> finalize is FEATURES_OK. Renaming that is a bigger
> patch though, and I'd like this one to be cherry-pickable
> to stable.

Do we want to add a comment before the calls to ->finalize_features()
(/* write features to device */) and adapt the comment in virtio_ring.h?
Should still be stable-friendly, and giving the callback a better name
can be a follow-up patch.

>
>> > +
>> >   	ret = virtio_finalize_features(dev);
>> >   	if (ret)
>> >   		goto err;


WARNING: multiple messages have this Message-ID (diff)
From: Cornelia Huck <cohuck@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>
Cc: Halil Pasic <pasic@linux.ibm.com>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] virtio: acknowledge all features before access
Date: Mon, 17 Jan 2022 13:38:42 +0100	[thread overview]
Message-ID: <87mtjuv8od.fsf@redhat.com> (raw)
In-Reply-To: <20220117032429-mutt-send-email-mst@kernel.org>

On Mon, Jan 17 2022, "Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Mon, Jan 17, 2022 at 02:31:49PM +0800, Jason Wang wrote:
>> 
>> 在 2022/1/15 上午4:09, Michael S. Tsirkin 写道:
>> > @@ -495,6 +494,10 @@ int virtio_device_restore(struct virtio_device *dev)
>> >   	/* We have a driver! */
>> >   	virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER);
>> > +	ret = dev->config->finalize_features(dev);
>> > +	if (ret)
>> > +		goto err;
>> 
>> 
>> Is this part of code related?
>> 
>> Thanks
>> 
>
> Yes. virtio_finalize_features no longer calls dev->config->finalize_features.
>
> I think the dev->config->finalize_features callback is actually
> a misnomer now, it just sends the features to device,
> finalize is FEATURES_OK. Renaming that is a bigger
> patch though, and I'd like this one to be cherry-pickable
> to stable.

Do we want to add a comment before the calls to ->finalize_features()
(/* write features to device */) and adapt the comment in virtio_ring.h?
Should still be stable-friendly, and giving the callback a better name
can be a follow-up patch.

>
>> > +
>> >   	ret = virtio_finalize_features(dev);
>> >   	if (ret)
>> >   		goto err;

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  reply	other threads:[~2022-01-17 12:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-14 20:09 [PATCH] virtio: acknowledge all features before access Michael S. Tsirkin
2022-01-14 20:09 ` Michael S. Tsirkin
2022-01-17  6:31 ` Jason Wang
2022-01-17  6:31   ` Jason Wang
2022-01-17  8:26   ` Michael S. Tsirkin
2022-01-17  8:26     ` Michael S. Tsirkin
2022-01-17 12:38     ` Cornelia Huck [this message]
2022-01-17 12:38       ` Cornelia Huck
2022-01-17 23:13       ` Michael S. Tsirkin
2022-01-17 23:13         ` Michael S. Tsirkin
2022-01-18 15:43       ` Michael S. Tsirkin
2022-01-18 15:43         ` Michael S. Tsirkin
2022-01-18 17:10         ` Cornelia Huck
2022-01-18 17:10           ` Cornelia Huck
2022-01-18 12:48 ` Halil Pasic
2022-01-18 12:48   ` Halil Pasic
2022-01-18 15:11   ` Michael S. Tsirkin
2022-01-18 15:11     ` Michael S. Tsirkin
2022-01-18 14:43 ` Halil Pasic
2022-01-18 14:43   ` Halil Pasic
2022-01-18 15:20   ` Michael S. Tsirkin
2022-01-18 15:20     ` Michael S. Tsirkin

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=87mtjuv8od.fsf@redhat.com \
    --to=cohuck@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=stable@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.