iPXE
Data Fields
gve_qpl Struct Reference

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...
 

Detailed Description

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.

Definition at line 485 of file gve.h.

Field Documentation

◆ data

userptr_t gve_qpl::data

Page addresses.

Definition at line 487 of file gve.h.

Referenced by gve_register().

◆ map

struct dma_mapping gve_qpl::map

Page mapping.

Definition at line 489 of file gve.h.

Referenced by gve_register().

◆ count

unsigned int gve_qpl::count

Number of pages.

Definition at line 491 of file gve.h.

Referenced by gve_register().

◆ id

unsigned int gve_qpl::id

Queue page list ID.

Definition at line 493 of file gve.h.

Referenced by gve_register(), and gve_unregister().


The documentation for this struct was generated from the following file: