[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC v2 02/13] vhost: Save masked_notifier state
From: |
Eugenio Pérez |
Subject: |
[RFC v2 02/13] vhost: Save masked_notifier state |
Date: |
Mon, 15 Mar 2021 20:48:31 +0100 |
It will be used to configure shadow virtqueue. Shadow virtqueue will
relay the device->guest notifications, so vhost need to be able to tell
the masking status.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
include/hw/virtio/vhost.h | 1 +
hw/virtio/vhost.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h
index 4a8bc75415..ac963bf23d 100644
--- a/include/hw/virtio/vhost.h
+++ b/include/hw/virtio/vhost.h
@@ -28,6 +28,7 @@ struct vhost_virtqueue {
unsigned avail_size;
unsigned long long used_phys;
unsigned used_size;
+ bool notifier_is_masked;
EventNotifier masked_notifier;
struct vhost_dev *dev;
};
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index e2163a0d63..4680c0cfcf 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -1527,6 +1527,8 @@ void vhost_virtqueue_mask(struct vhost_dev *hdev,
VirtIODevice *vdev, int n,
r = hdev->vhost_ops->vhost_set_vring_call(hdev, &file);
if (r < 0) {
VHOST_OPS_DEBUG("vhost_set_vring_call failed");
+ } else {
+ hdev->vqs[index].notifier_is_masked = mask;
}
}
--
2.27.0
- [RFC v2 00/13] vDPA software assisted live migration, Eugenio Pérez, 2021/03/15
- [RFC v2 01/13] virtio: Add virtio_queue_is_host_notifier_enabled, Eugenio Pérez, 2021/03/15
- [RFC v2 02/13] vhost: Save masked_notifier state,
Eugenio Pérez <=
- [RFC v2 03/13] vhost: Add VhostShadowVirtqueue, Eugenio Pérez, 2021/03/15
- [RFC v2 04/13] vhost: Add x-vhost-enable-shadow-vq qmp, Eugenio Pérez, 2021/03/15
- [RFC v2 05/13] vhost: Route guest->host notification through shadow virtqueue, Eugenio Pérez, 2021/03/15
- Re: [RFC v2 05/13] vhost: Route guest->host notification through shadow virtqueue, Jason Wang, 2021/03/16
- Re: [RFC v2 05/13] vhost: Route guest->host notification through shadow virtqueue, Eugenio Perez Martin, 2021/03/16
- Re: [RFC v2 05/13] vhost: Route guest->host notification through shadow virtqueue, Jason Wang, 2021/03/16
- Re: [RFC v2 05/13] vhost: Route guest->host notification through shadow virtqueue, Eugenio Perez Martin, 2021/03/17
- Re: [RFC v2 05/13] vhost: Route guest->host notification through shadow virtqueue, Jason Wang, 2021/03/17
- Re: [RFC v2 05/13] vhost: Route guest->host notification through shadow virtqueue, Eugenio Perez Martin, 2021/03/18