diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2022-01-19 13:20:21 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2022-01-27 11:26:01 -0500 |
commit | f13b650015eba78725ceaf992b5ad6858fd77769 (patch) | |
tree | a3afa568bdf0f0abcc58ce2245075b9cfc748cd5 /src/hw/nvme-int.h | |
parent | 0a40653f3013a31f3f7aeeddd7633328469a3ad3 (diff) | |
download | seabios-f13b650015eba78725ceaf992b5ad6858fd77769.tar.gz |
nvme: Build the page list in the existing dma buffer
Commit 01f2736cc905d ("nvme: Pass large I/O requests as PRP lists")
introduced multi-page requests using the NVMe PRP mechanism. To store the
list and "first page to write to" hints, it added fields to the NVMe
namespace struct.
Unfortunately, that struct resides in fseg which is read-only at runtime.
While KVM ignores the read-only part and allows writes, real hardware and
TCG adhere to the semantics and ignore writes to the fseg region. The net
effect of that is that reads and writes were always happening on address 0,
unless they went through the bounce buffer logic.
This patch builds the PRP maintenance data in the existing "dma bounce
buffer" and only builds it when needed.
Fixes: 01f2736cc905d ("nvme: Pass large I/O requests as PRP lists")
Reported-by: Matt DeVillier <matt.devillier@gmail.com>
Signed-off-by: Alexander Graf <graf@amazon.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Reviewed-by: Alexander Graf <graf@amazon.com>
Diffstat (limited to 'src/hw/nvme-int.h')
-rw-r--r-- | src/hw/nvme-int.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/hw/nvme-int.h b/src/hw/nvme-int.h index 9564c17b..f0d717d5 100644 --- a/src/hw/nvme-int.h +++ b/src/hw/nvme-int.h @@ -10,8 +10,6 @@ #include "types.h" // u32 #include "pcidevice.h" // struct pci_device -#define NVME_MAX_PRPL_ENTRIES 15 /* Allows requests up to 64kb */ - /* Data structures */ /* The register file of a NVMe host controller. This struct follows the naming @@ -122,10 +120,6 @@ struct nvme_namespace { /* Page aligned buffer of size NVME_PAGE_SIZE. */ char *dma_buffer; - - /* Page List */ - u32 prpl_len; - u64 prpl[NVME_MAX_PRPL_ENTRIES]; }; /* Data structures for NVMe admin identify commands */ |