On Tue, Jul 28, 2020 at 12:24:03PM +0800, Zhu Lingshan wrote: > > +static void vhost_vdpa_setup_vq_irq(struct vhost_vdpa *v, int qid) > +{ > + struct vhost_virtqueue *vq = &v->vqs[qid]; > + const struct vdpa_config_ops *ops = v->vdpa->config; > + struct vdpa_device *vdpa = v->vdpa; > + int ret, irq; > + > + spin_lock(&vq->call_ctx.ctx_lock); > + irq = ops->get_vq_irq(vdpa, qid); > + if (!vq->call_ctx.ctx || irq == -EINVAL) { > + spin_unlock(&vq->call_ctx.ctx_lock); > + return; > + } > + If I understand correctly, this will cause these IRQs to be forwarded directly to the VCPU, e.g. will be handled by the guest/qemu. Does this mean that the host will not handle this interrupt? How does it work in case on level triggered interrupts? In the case of ConnectX, I need to execute some code to acknowledge the interrupt. Can you explain how this should be done?