提交 6da02181 编写于 作者: K Keith Busch 提交者: Kevin Wolf

nvme: Fix spurious interrupts

The code had asserted an interrupt every time it was requested to check
for new completion queue entries.This can result in spurious interrupts
seen by the guest OS.

Fix this by asserting an interrupt only if there are un-acknowledged
completion queue entries available.
Reported-by: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NKeith Busch <keith.busch@intel.com>
Tested-by: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 330ca111
......@@ -272,7 +272,9 @@ static void nvme_post_cqes(void *opaque)
sizeof(req->cqe));
QTAILQ_INSERT_TAIL(&sq->req_list, req, entry);
}
nvme_irq_assert(n, cq);
if (cq->tail != cq->head) {
nvme_irq_assert(n, cq);
}
}
static void nvme_enqueue_req_completion(NvmeCQueue *cq, NvmeRequest *req)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册