iPXE
|
Queue page list. More...
#include <gve.h>
Data Fields | |
userptr_t | data |
Page addresses. More... | |
struct dma_mapping | map |
Page mapping. More... | |
unsigned int | count |
Number of pages. More... | |
unsigned int | id |
Queue page list ID. More... | |
Queue page list.
The device uses preregistered pages for fast-path DMA operations (i.e. transmit and receive buffers). A list of device addresses for each page must be registered before the transmit or receive queue is created, and cannot subsequently be modified.
The Linux driver allocates pages as DMA_TO_DEVICE or DMA_FROM_DEVICE as appropriate, and uses dma_sync_single_for_cpu() etc to ensure that data is copied to/from bounce buffers as needed.
Unfortunately there is no such sync operation available within our DMA API, since we are constrained by the limitations imposed by EFI_PCI_IO_PROTOCOL. There is no way to synchronise a buffer without also [un]mapping it, and no way to force the reuse of the same device address for a subsequent remapping. We are therefore constrained to use only DMA-coherent buffers, since this is the only way we can repeatedly reuse the same device address.
Newer versions of the gVNIC device support "raw DMA addressing (RDA)", which is essentially a prebuilt queue page list covering the whole of the guest address space. Unfortunately we cannot rely on this, since older versions will not support it.
Experimentation suggests that the device will accept a request to create a queue page list covering the whole of the guest address space via two giant "pages" of 2^63 bytes each. However, experimentation also suggests that the device will accept any old garbage value as the "page size". In the total absence of any documentation, it is probably unsafe to conclude that the device is bothering to look at or respect the "page size" parameter: it is most likely just presuming the use of 4kB pages.
userptr_t gve_qpl::data |
Page addresses.
Definition at line 462 of file gve.h.
Referenced by gve_alloc_qpl(), gve_free_qpl(), and gve_register().
struct dma_mapping gve_qpl::map |
Page mapping.
Definition at line 464 of file gve.h.
Referenced by gve_alloc_qpl(), gve_free_qpl(), and gve_register().
unsigned int gve_qpl::count |
Number of pages.
Definition at line 466 of file gve.h.
Referenced by gve_alloc_qpl(), gve_free_qpl(), and gve_register().
unsigned int gve_qpl::id |
Queue page list ID.
Definition at line 468 of file gve.h.
Referenced by gve_alloc_qpl(), gve_register(), and gve_unregister().