+int
+vhost_enable_guest_notification(struct virtio_net *dev,
+ struct vhost_virtqueue *vq, int enable)
+{
+ /*
+ * If the virtqueue is not ready yet, it will be applied
+ * when it will become ready.
+ */
+ if (!vq->ready)
+ return 0;
+
+ if (vq_is_packed(dev))
+ return vhost_enable_notify_packed(dev, vq, enable);
+ else
+ return vhost_enable_notify_split(dev, vq, enable);
+}
+