Skip to content

Commit

Permalink
virtio_pci: struct virtio_pci_common_cfg add queue_notify_data
Browse files Browse the repository at this point in the history
Add queue_notify_data in struct virtio_pci_common_cfg, which comes from
here https://github.com/oasis-tcs/virtio-spec/issues/89

In order not to affect the API, add a dedicated structure struct
virtio_pci_modern_common_cfg to virtio_pci_modern.h.

Since I want to add queue_reset after queue_notify_data, I submitted
this patch first.

Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20220801063902.129329-26-xuanzhuo@linux.alibaba.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  • Loading branch information
Xuan Zhuo authored and Michael S. Tsirkin committed Aug 11, 2022
1 parent c790e8e commit ea02459
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/linux/virtio_pci_modern.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
#include <linux/pci.h>
#include <linux/virtio_pci.h>

struct virtio_pci_modern_common_cfg {
struct virtio_pci_common_cfg cfg;

__le16 queue_notify_data; /* read-write */
__le16 padding;
};

struct virtio_pci_modern_device {
struct pci_dev *pci_dev;

Expand Down
1 change: 1 addition & 0 deletions include/uapi/linux/virtio_pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ struct virtio_pci_cfg_cap {
#define VIRTIO_PCI_COMMON_Q_AVAILHI 44
#define VIRTIO_PCI_COMMON_Q_USEDLO 48
#define VIRTIO_PCI_COMMON_Q_USEDHI 52
#define VIRTIO_PCI_COMMON_Q_NDATA 56

#endif /* VIRTIO_PCI_NO_MODERN */

Expand Down

0 comments on commit ea02459

Please sign in to comment.