On Sat, Jan 29, 2022 at 8:57 AM Jason Wang <jasow...@redhat.com> wrote: > > > 在 2022/1/22 上午4:27, Eugenio Pérez 写道: > > This allows vhost-vdpa device to retrieve device -> svq call eventfd. > > > > Signed-off-by: Eugenio Pérez <epere...@redhat.com> > > > What did 'dd' mean in the title? >
It was intended to be "add" but I missed the first letter. I will fix for the next version. Thanks! > Thanks > > > > --- > > hw/virtio/vhost-shadow-virtqueue.h | 2 ++ > > hw/virtio/vhost-shadow-virtqueue.c | 12 ++++++++++++ > > 2 files changed, 14 insertions(+) > > > > diff --git a/hw/virtio/vhost-shadow-virtqueue.h > > b/hw/virtio/vhost-shadow-virtqueue.h > > index 4c583a9171..a78234b52b 100644 > > --- a/hw/virtio/vhost-shadow-virtqueue.h > > +++ b/hw/virtio/vhost-shadow-virtqueue.h > > @@ -18,6 +18,8 @@ typedef struct VhostShadowVirtqueue VhostShadowVirtqueue; > > void vhost_svq_set_svq_kick_fd(VhostShadowVirtqueue *svq, int > > svq_kick_fd); > > const EventNotifier *vhost_svq_get_dev_kick_notifier( > > const VhostShadowVirtqueue > > *svq); > > +const EventNotifier *vhost_svq_get_svq_call_notifier( > > + const VhostShadowVirtqueue > > *svq); > > > > void vhost_svq_stop(VhostShadowVirtqueue *svq); > > > > diff --git a/hw/virtio/vhost-shadow-virtqueue.c > > b/hw/virtio/vhost-shadow-virtqueue.c > > index 8991f0b3c3..25fcdf16ec 100644 > > --- a/hw/virtio/vhost-shadow-virtqueue.c > > +++ b/hw/virtio/vhost-shadow-virtqueue.c > > @@ -55,6 +55,18 @@ static void vhost_handle_guest_kick(EventNotifier *n) > > event_notifier_set(&svq->hdev_kick); > > } > > > > +/** > > + * Obtain the SVQ call notifier, where vhost device notifies SVQ that there > > + * exists pending used buffers. > > + * > > + * @svq Shadow Virtqueue > > + */ > > +const EventNotifier *vhost_svq_get_svq_call_notifier( > > + const VhostShadowVirtqueue > > *svq) > > +{ > > + return &svq->hdev_call; > > +} > > + > > /** > > * Set a new file descriptor for the guest to kick SVQ and notify for > > avail > > * >