Michael S. Tsirkin
2022-Jun-24 06:59 UTC
[PATCH v10 25/41] virtio_pci: struct virtio_pci_common_cfg add queue_notify_data
On Fri, Jun 24, 2022 at 10:56:05AM +0800, Xuan Zhuo wrote:> Add queue_notify_data in struct virtio_pci_common_cfg, which comes from > here https://github.com/oasis-tcs/virtio-spec/issues/89 > > For not breaks uABI, add a new struct virtio_pci_common_cfg_notify.What exactly is meant by not breaking uABI? Users are supposed to be prepared for struct size to change ... no?> Since I want to add queue_reset after queue_notify_data, I submitted > this patch first. > > Signed-off-by: Xuan Zhuo <xuanzhuo at linux.alibaba.com> > Acked-by: Jason Wang <jasowang at redhat.com> > --- > include/uapi/linux/virtio_pci.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/include/uapi/linux/virtio_pci.h b/include/uapi/linux/virtio_pci.h > index 3a86f36d7e3d..22bec9bd0dfc 100644 > --- a/include/uapi/linux/virtio_pci.h > +++ b/include/uapi/linux/virtio_pci.h > @@ -166,6 +166,13 @@ struct virtio_pci_common_cfg { > __le32 queue_used_hi; /* read-write */ > }; > > +struct virtio_pci_common_cfg_notify { > + struct virtio_pci_common_cfg cfg; > + > + __le16 queue_notify_data; /* read-write */ > + __le16 padding; > +}; > + > /* Fields in VIRTIO_PCI_CAP_PCI_CFG: */ > struct virtio_pci_cfg_cap { > struct virtio_pci_cap cap; > -- > 2.31.0
Xuan Zhuo
2022-Jun-24 07:22 UTC
[PATCH v10 25/41] virtio_pci: struct virtio_pci_common_cfg add queue_notify_data
On Fri, 24 Jun 2022 02:59:39 -0400, "Michael S. Tsirkin" <mst at redhat.com> wrote:> On Fri, Jun 24, 2022 at 10:56:05AM +0800, Xuan Zhuo wrote: > > Add queue_notify_data in struct virtio_pci_common_cfg, which comes from > > here https://github.com/oasis-tcs/virtio-spec/issues/89 > > > > For not breaks uABI, add a new struct virtio_pci_common_cfg_notify. > > What exactly is meant by not breaking uABI? > Users are supposed to be prepared for struct size to change ... no?This was a previous discussion with Jason Wang, who was concerned about affecting some existing programs. https://lore.kernel.org/all/CACGkMEshTp8vSP9=pKj82y8+DDQFu9tFAk1EGhMZLvXUE-OSEA at mail.gmail.com/ Thanks.> > > > Since I want to add queue_reset after queue_notify_data, I submitted > > this patch first. > > > > Signed-off-by: Xuan Zhuo <xuanzhuo at linux.alibaba.com> > > Acked-by: Jason Wang <jasowang at redhat.com> > > --- > > include/uapi/linux/virtio_pci.h | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/include/uapi/linux/virtio_pci.h b/include/uapi/linux/virtio_pci.h > > index 3a86f36d7e3d..22bec9bd0dfc 100644 > > --- a/include/uapi/linux/virtio_pci.h > > +++ b/include/uapi/linux/virtio_pci.h > > @@ -166,6 +166,13 @@ struct virtio_pci_common_cfg { > > __le32 queue_used_hi; /* read-write */ > > }; > > > > +struct virtio_pci_common_cfg_notify { > > + struct virtio_pci_common_cfg cfg; > > + > > + __le16 queue_notify_data; /* read-write */ > > + __le16 padding; > > +}; > > + > > /* Fields in VIRTIO_PCI_CAP_PCI_CFG: */ > > struct virtio_pci_cfg_cap { > > struct virtio_pci_cap cap; > > -- > > 2.31.0 >
Jason Wang
2022-Jun-27 02:30 UTC
[PATCH v10 25/41] virtio_pci: struct virtio_pci_common_cfg add queue_notify_data
On Fri, Jun 24, 2022 at 2:59 PM Michael S. Tsirkin <mst at redhat.com> wrote:> > On Fri, Jun 24, 2022 at 10:56:05AM +0800, Xuan Zhuo wrote: > > Add queue_notify_data in struct virtio_pci_common_cfg, which comes from > > here https://github.com/oasis-tcs/virtio-spec/issues/89 > > > > For not breaks uABI, add a new struct virtio_pci_common_cfg_notify. > > What exactly is meant by not breaking uABI? > Users are supposed to be prepared for struct size to change ... no?Not sure, any doc for this? Thanks> > > > Since I want to add queue_reset after queue_notify_data, I submitted > > this patch first. > > > > Signed-off-by: Xuan Zhuo <xuanzhuo at linux.alibaba.com> > > Acked-by: Jason Wang <jasowang at redhat.com> > > --- > > include/uapi/linux/virtio_pci.h | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/include/uapi/linux/virtio_pci.h b/include/uapi/linux/virtio_pci.h > > index 3a86f36d7e3d..22bec9bd0dfc 100644 > > --- a/include/uapi/linux/virtio_pci.h > > +++ b/include/uapi/linux/virtio_pci.h > > @@ -166,6 +166,13 @@ struct virtio_pci_common_cfg { > > __le32 queue_used_hi; /* read-write */ > > }; > > > > +struct virtio_pci_common_cfg_notify { > > + struct virtio_pci_common_cfg cfg; > > + > > + __le16 queue_notify_data; /* read-write */ > > + __le16 padding; > > +}; > > + > > /* Fields in VIRTIO_PCI_CAP_PCI_CFG: */ > > struct virtio_pci_cfg_cap { > > struct virtio_pci_cap cap; > > -- > > 2.31.0 >