mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
vhost: add support for configure interrupt
Add functions to support configure interrupt. The configure interrupt process will start in vhost_dev_start and stop in vhost_dev_stop. Also add the functions to support vhost_config_pending and vhost_config_mask. Signed-off-by: Cindy Lu <lulu@redhat.com> Message-Id: <20221222070451.936503-8-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
7d847d0c9b
commit
f9a09ca3ea
2 changed files with 81 additions and 1 deletions
|
@ -33,6 +33,7 @@ struct vhost_virtqueue {
|
|||
unsigned used_size;
|
||||
EventNotifier masked_notifier;
|
||||
EventNotifier error_notifier;
|
||||
EventNotifier masked_config_notifier;
|
||||
struct vhost_dev *dev;
|
||||
};
|
||||
|
||||
|
@ -41,6 +42,7 @@ typedef unsigned long vhost_log_chunk_t;
|
|||
#define VHOST_LOG_BITS (8 * sizeof(vhost_log_chunk_t))
|
||||
#define VHOST_LOG_CHUNK (VHOST_LOG_PAGE * VHOST_LOG_BITS)
|
||||
#define VHOST_INVALID_FEATURE_BIT (0xff)
|
||||
#define VHOST_QUEUE_NUM_CONFIG_INR 0
|
||||
|
||||
struct vhost_log {
|
||||
unsigned long long size;
|
||||
|
@ -187,6 +189,8 @@ int vhost_dev_enable_notifiers(struct vhost_dev *hdev, VirtIODevice *vdev);
|
|||
* Disable direct notifications to vhost device.
|
||||
*/
|
||||
void vhost_dev_disable_notifiers(struct vhost_dev *hdev, VirtIODevice *vdev);
|
||||
bool vhost_config_pending(struct vhost_dev *hdev);
|
||||
void vhost_config_mask(struct vhost_dev *hdev, VirtIODevice *vdev, bool mask);
|
||||
|
||||
/**
|
||||
* vhost_dev_is_started() - report status of vhost device
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue