Ping~ > @@ -4271,6 +4343,11 @@ static void nvme_init_sq(NvmeSQueue *sq, NvmeCtrl *n, > uint64_t dma_addr, > if (n->dbbuf_enabled) { > sq->db_addr = n->dbbuf_dbs + (sqid << 3); > sq->ei_addr = n->dbbuf_eis + (sqid << 3); > + > + if (n->params.ioeventfd && sq->sqid != 0) { > + ret = nvme_init_sq_ioeventfd(sq); > + sq->ioeventfd_enabled = ret == 0; > + } > } > > assert(n->cq[cqid]);
Is this “ret == 0” a correct way for error handling? I’ve also been wondering whether using irqfd for sending interrupts can bring some benefits. I’m not familiar with how QEMU emulates interrupts. What do you think of irqfd’s?