mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
virtio: support setting memory region based host notifier
This patch introduces the support for setting memory region based host notifiers for virtio device. This is helpful when using a hardware accelerator for a virtio device, because hardware heavily depends on the notification, this will allow the guest driver in the VM to notify the hardware directly. Signed-off-by: Tiwei Bie <tiwei.bie@intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
1f3a4519b1
commit
6f80e6170e
4 changed files with 39 additions and 0 deletions
|
|
@ -52,6 +52,8 @@ typedef struct VirtioBusClass {
|
|||
bool (*has_extra_state)(DeviceState *d);
|
||||
bool (*query_guest_notifiers)(DeviceState *d);
|
||||
int (*set_guest_notifiers)(DeviceState *d, int nvqs, bool assign);
|
||||
int (*set_host_notifier_mr)(DeviceState *d, int n,
|
||||
MemoryRegion *mr, bool assign);
|
||||
void (*vmstate_change)(DeviceState *d, bool running);
|
||||
/*
|
||||
* Expose the features the transport layer supports before
|
||||
|
|
|
|||
|
|
@ -239,6 +239,8 @@ void virtio_queue_set_align(VirtIODevice *vdev, int n, int align);
|
|||
void virtio_queue_notify(VirtIODevice *vdev, int n);
|
||||
uint16_t virtio_queue_vector(VirtIODevice *vdev, int n);
|
||||
void virtio_queue_set_vector(VirtIODevice *vdev, int n, uint16_t vector);
|
||||
int virtio_queue_set_host_notifier_mr(VirtIODevice *vdev, int n,
|
||||
MemoryRegion *mr, bool assign);
|
||||
int virtio_set_status(VirtIODevice *vdev, uint8_t val);
|
||||
void virtio_reset(void *opaque);
|
||||
void virtio_update_irq(VirtIODevice *vdev);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue