[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 02/17] hw/block/nvme: handle dma errors
From: |
Klaus Jensen |
Subject: |
Re: [PATCH 02/17] hw/block/nvme: handle dma errors |
Date: |
Mon, 7 Sep 2020 09:49:06 +0200 |
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.jensen@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.jensen@samsung.com>
> > Acked-by: Keith Busch <kbusch@kernel.org>
> > Reviewed-by: Maxim Levitsky <mlevitsk@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
- [PATCH 00/17] hw/block/nvme: multiple namespaces support, Klaus Jensen, 2020/09/04
- [PATCH 01/17] pci: pass along the return value of dma_memory_rw, Klaus Jensen, 2020/09/04
- [PATCH 02/17] hw/block/nvme: handle dma errors, Klaus Jensen, 2020/09/04
- [PATCH 04/17] hw/block/nvme: alignment style fixes, Klaus Jensen, 2020/09/04
- [PATCH 03/17] hw/block/nvme: commonize nvme_rw error handling, Klaus Jensen, 2020/09/04
- [PATCH 05/17] hw/block/nvme: add a lba to bytes helper, Klaus Jensen, 2020/09/04
- [PATCH 08/17] hw/block/nvme: refactor aio submission, Klaus Jensen, 2020/09/04
[PATCH 06/17] hw/block/nvme: fix endian conversion, Klaus Jensen, 2020/09/04