On Mon, 7 Feb 2022 11:41:06 +0800, Jason Wang <jasow...@redhat.com> wrote:
>
> 在 2022/1/26 下午3:35, Xuan Zhuo 写道:
> > Add queue_notify_data in struct virtio_pci_common_cfg, which comes from
> > here https://github.com/oasis-tcs/virtio-spec/issues/89
> >
> > Since I want to add queue_reset after it, I submitted this patch first.
> >
> > Signed-off-by: Xuan Zhuo <xuanz...@linux.alibaba.com>
> > ---
> >   include/uapi/linux/virtio_pci.h | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/include/uapi/linux/virtio_pci.h 
> > b/include/uapi/linux/virtio_pci.h
> > index 3a86f36d7e3d..492c89f56c6a 100644
> > --- a/include/uapi/linux/virtio_pci.h
> > +++ b/include/uapi/linux/virtio_pci.h
> > @@ -164,6 +164,7 @@ struct virtio_pci_common_cfg {
> >     __le32 queue_avail_hi;          /* read-write */
> >     __le32 queue_used_lo;           /* read-write */
> >     __le32 queue_used_hi;           /* read-write */
> > +   __le16 queue_notify_data;       /* read-write */
> >   };
>
>
> So I had the same concern as previous version.
>
> This breaks uABI where program may try to use sizeof(struct
> virtio_pci_common_cfg).
>
> We probably need a container structure here.

I see, I plan to add a struct like this, do you think it's appropriate?

struct virtio_pci_common_cfg_v1 {
        struct virtio_pci_common_cfg cfg;
        __le16 queue_notify_data;       /* read-write */
}

Thanks.

>
> THanks
>
>
> >
> >   /* Fields in VIRTIO_PCI_CAP_PCI_CFG: */
>
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Reply via email to