From: Alvaro Karsz <alvaro.karsz@solid-run.com>
To: Viktor Prutyanov <viktor@daynix.com>,
"mst@redhat.com" <mst@redhat.com>,
"jasowang@redhat.com" <jasowang@redhat.com>
Cc: "linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>,
"farman@linux.ibm.com" <farman@linux.ibm.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"cohuck@redhat.com" <cohuck@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"virtualization@lists.linux-foundation.org"
<virtualization@lists.linux-foundation.org>,
"pasic@linux.ibm.com" <pasic@linux.ibm.com>,
"yan@daynix.com" <yan@daynix.com>
Subject: Re: [PATCH v6] virtio: add VIRTIO_F_NOTIFICATION_DATA feature support
Date: Sun, 2 Apr 2023 08:17:49 +0000 [thread overview]
Message-ID: <AM0PR04MB4723A8D079076FA56AB45845D48C9@AM0PR04MB4723.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20230324195029.2410503-1-viktor@daynix.com>
Hi Viktor,
> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
> index 4c3bb0ddeb9b..f9c6604352b4 100644
> --- a/drivers/virtio/virtio_ring.c
> +++ b/drivers/virtio/virtio_ring.c
> @@ -2752,6 +2752,23 @@ void vring_del_virtqueue(struct virtqueue *_vq)
> }
> EXPORT_SYMBOL_GPL(vring_del_virtqueue);
>
> +u32 vring_notification_data(struct virtqueue *_vq)
> +{
> + struct vring_virtqueue *vq = to_vvq(_vq);
> + u16 next;
> +
> + if (vq->packed_ring)
> + next = (vq->packed.next_avail_idx &
> + ~(-(1 << VRING_PACKED_EVENT_F_WRAP_CTR))) |
> + vq->packed.avail_wrap_counter <<
> + VRING_PACKED_EVENT_F_WRAP_CTR;
> + else
> + next = vq->split.avail_idx_shadow;
> +
> + return next << 16 | _vq->index;
> +}
> +EXPORT_SYMBOL_GPL(vring_notification_data);
> +
> /* Manipulates transport-specific feature bits. */
> void vring_transport_features(struct virtio_device *vdev)
> {
> @@ -2771,6 +2788,8 @@ void vring_transport_features(struct virtio_device *vdev)
> break;
> case VIRTIO_F_ORDER_PLATFORM:
> break;
> + case VIRTIO_F_NOTIFICATION_DATA:
> + break;
This function is used by virtio_vdpa as well (drivers/virtio/virtio_vdpa.c:virtio_vdpa_finalize_features).
A vDPA device can offer this feature and it will be accepted, even though VIRTIO_F_NOTIFICATION_DATA is not a thing for the vDPA transport at the moment.
I don't know if this is bad, since offering VIRTIO_F_NOTIFICATION_DATA is meaningless for a vDPA device at the moment.
I submitted a patch adding support for vDPA transport.
https://lore.kernel.org/virtualization/20230402081034.1021886-1-alvaro.karsz@solid-run.com/T/#u
> default:
> /* We don't understand this bit. */
> __virtio_clear_bit(vdev, i);
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2023-04-02 8:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230324195029.2410503-1-viktor@daynix.com>
[not found] ` <CAPv0NP7e95ZYk1-XdQitGwiqRNUQFx=a_2s7ivD4y-PzGRdhsw@mail.gmail.com>
2023-03-30 1:50 ` [PATCH v6] virtio: add VIRTIO_F_NOTIFICATION_DATA feature support Xuan Zhuo
2023-04-02 8:17 ` Alvaro Karsz [this message]
2023-04-04 18:16 ` Michael S. Tsirkin
2023-04-07 16:48 ` Alvaro Karsz
2023-04-13 7:40 ` Alvaro Karsz
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=AM0PR04MB4723A8D079076FA56AB45845D48C9@AM0PR04MB4723.eurprd04.prod.outlook.com \
--to=alvaro.karsz@solid-run.com \
--cc=cohuck@redhat.com \
--cc=farman@linux.ibm.com \
--cc=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mst@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=viktor@daynix.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=yan@daynix.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).