mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX
To support configure interrupt for vhost-vdpa Introduce VIRTIO_CONFIG_IRQ_IDX -1 as configure interrupt's queue index, Then we can reuse the functions guest_notifier_mask and guest_notifier_pending. Add the check of queue index in these drivers, if the driver does not support configure interrupt, the function will just return Signed-off-by: Cindy Lu <lulu@redhat.com> Message-Id: <20221222070451.936503-2-lulu@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
c9bdc449f9
commit
544f0278af
7 changed files with 105 additions and 2 deletions
|
@ -79,6 +79,9 @@ typedef struct VirtQueueElement
|
|||
|
||||
#define VIRTIO_NO_VECTOR 0xffff
|
||||
|
||||
/* special index value used internally for config irqs */
|
||||
#define VIRTIO_CONFIG_IRQ_IDX -1
|
||||
|
||||
#define TYPE_VIRTIO_DEVICE "virtio-device"
|
||||
OBJECT_DECLARE_TYPE(VirtIODevice, VirtioDeviceClass, VIRTIO_DEVICE)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue