On Sep 7 04:34, Philippe Mathieu-Daudé wrote: > Hi Klaus, > > On 9/4/20 4:19 PM, Klaus Jensen wrote: > > From: Klaus Jensen <k.jen...@samsung.com> > > > > Handling DMA errors gracefully is required for the device to pass the > > block/011 test ("disable PCI device while doing I/O") in the blktests > > suite. > > > > With this patch the device passes the test by retrying "critical" > > transfers (posting of completion entries and processing of submission > > queue entries). > > > > If DMA errors occur at any other point in the execution of the command > > (say, while mapping the PRPs), the command is aborted with a Data > > Transfer Error status code. > > > > Signed-off-by: Klaus Jensen <k.jen...@samsung.com> > > Acked-by: Keith Busch <kbu...@kernel.org> > > Reviewed-by: Maxim Levitsky <mlevi...@redhat.com> > > --- > > hw/block/nvme.c | 43 ++++++++++++++++++++++++++++++++----------- > > hw/block/trace-events | 2 ++ > > include/block/nvme.h | 2 +- > > 3 files changed, 35 insertions(+), 12 deletions(-) > > > > diff --git a/hw/block/nvme.c b/hw/block/nvme.c > > index 63078f600920..49bcdf31ced6 100644 > > --- a/hw/block/nvme.c > > +++ b/hw/block/nvme.c > > @@ -140,14 +140,14 @@ static inline void *nvme_addr_to_cmb(NvmeCtrl *n, > > hwaddr addr) > > return &n->cmbuf[addr - n->ctrl_mem.addr]; > > } > > > > -static void nvme_addr_read(NvmeCtrl *n, hwaddr addr, void *buf, int size) > > +static int nvme_addr_read(NvmeCtrl *n, hwaddr addr, void *buf, int size) > > If this get merged first: > https://www.mail-archive.com/qemu-devel@nongnu.org/msg737483.html > then please return MemTxResult, ... >
Noted! :)
signature.asc
Description: PGP signature