nvme: Fix spurious interrupts
commit6da021815e752b3ca3a547eed53f3e92a8a35452
authorKeith Busch <keith.busch@intel.com>
Mon, 26 Nov 2018 17:17:45 +0000 (26 10:17 -0700)
committerKevin Wolf <kwolf@redhat.com>
Tue, 27 Nov 2018 11:59:00 +0000 (27 12:59 +0100)
treef9e45222736c566916af8dc65ab1a9cfa7798af3
parent330ca111ea0979d8c6fc9b3958f72d6dce164d5a
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: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/block/nvme.c