[SeaBIOS] [PATCH 0/5] Rework NVME page transfers and avoid fsegment allocation

Kevin O'Connor posted 5 patches 8 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/seabios tags/patchew/20220119184513.1828156-1-kevin@koconnor.net
There is a newer version of this series
src/hw/nvme-int.h |   7 ---
src/hw/nvme.c     | 143 ++++++++++++++++++++--------------------------
2 files changed, 61 insertions(+), 89 deletions(-)
[SeaBIOS] [PATCH 0/5] Rework NVME page transfers and avoid fsegment allocation
Posted by Kevin O'Connor 8 months, 1 week ago
Hi Alex,

I was looking at your recent fix for SeaBIOS NVME.  I agree that it is
not valid to write to the f-segment during runtime.  However, I was
struggling to understand the PRP list management in the nvme.c code.

I came up with a different implementation that avoids allocating
another buffer in the "high zone".  Instead, the code in this patch
series builds the page list in the existing "dma bounce buffer".

I don't have a good way to test this on real hardware.  It passes
simple qemu tests (both with and without kvm).  For example:

qemu-system-x86_64 -k en-us -snapshot -L test -chardev stdio,id=seabios -device isa-debugcon,iobase=0x402,chardev=seabios -m 512 -drive file=dos-drivec,if=none,id=drive0 -device nvme,drive=drive0,serial=nvme-1 -boot menu=on

Thanks,
-Kevin


Kevin O'Connor (5):
  nvme: Rework nvme_io_readwrite() to return -1 on error
  nvme: Add nvme_bounce_xfer() helper function
  nvme: Convert nvme_build_prpl() to nvme_prpl_xfer()
  nvme: Pass prp1 and prp2 directly to nvme_io_xfer()
  nvme: Build the page list in the existing dma buffer

 src/hw/nvme-int.h |   7 ---
 src/hw/nvme.c     | 143 ++++++++++++++++++++--------------------------
 2 files changed, 61 insertions(+), 89 deletions(-)

-- 
2.31.1

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH 0/5] Rework NVME page transfers and avoid fsegment allocation
Posted by Matt DeVillier 8 months, 1 week ago
patch set tested successfully along with the subsequent single bounce
buffer patch on a Purism Librem 15v4 w/Samsung 960 EVO

On Wed, Jan 19, 2022 at 12:45 PM Kevin O'Connor <kevin@koconnor.net> wrote:
>
> Hi Alex,
>
> I was looking at your recent fix for SeaBIOS NVME.  I agree that it is
> not valid to write to the f-segment during runtime.  However, I was
> struggling to understand the PRP list management in the nvme.c code.
>
> I came up with a different implementation that avoids allocating
> another buffer in the "high zone".  Instead, the code in this patch
> series builds the page list in the existing "dma bounce buffer".
>
> I don't have a good way to test this on real hardware.  It passes
> simple qemu tests (both with and without kvm).  For example:
>
> qemu-system-x86_64 -k en-us -snapshot -L test -chardev stdio,id=seabios -device isa-debugcon,iobase=0x402,chardev=seabios -m 512 -drive file=dos-drivec,if=none,id=drive0 -device nvme,drive=drive0,serial=nvme-1 -boot menu=on
>
> Thanks,
> -Kevin
>
>
> Kevin O'Connor (5):
>   nvme: Rework nvme_io_readwrite() to return -1 on error
>   nvme: Add nvme_bounce_xfer() helper function
>   nvme: Convert nvme_build_prpl() to nvme_prpl_xfer()
>   nvme: Pass prp1 and prp2 directly to nvme_io_xfer()
>   nvme: Build the page list in the existing dma buffer
>
>  src/hw/nvme-int.h |   7 ---
>  src/hw/nvme.c     | 143 ++++++++++++++++++++--------------------------
>  2 files changed, 61 insertions(+), 89 deletions(-)
>
> --
> 2.31.1
>
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org