/* This actually signals the guest, using eventfd. */'used_flags' was originally designed for 1.0, why should we pay attetion to it here?
void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq)
{
@@ -2802,10 +2930,34 @@ static bool vhost_enable_notify_packed(struct vhost_dev *dev,
struct vhost_virtqueue *vq)
{
struct vring_desc_packed *d = vq->desc_packed + vq->avail_idx;
- __virtio16 flags;
+ __virtio16 flags = RING_EVENT_FLAGS_ENABLE;
int ret;
- /* FIXME: disable notification through device area */
+ if (!(vq->used_flags & VRING_USED_F_NO_NOTIFY))
+ return false;
+ vq->used_flags &= ~VRING_USED_F_NO_NOTIFY;
Wei