iPXE
Data Fields
gve_qpl Struct Reference

Queue page list. More...

#include <gve.h>

Data Fields

void * 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...
 
physaddr_t base
 Queue page list base device address. 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 522 of file gve.h.

Field Documentation

◆ data

void* gve_qpl::data

Page addresses.

Definition at line 524 of file gve.h.

Referenced by gve_alloc_qpl(), gve_free_qpl(), and gve_register().

◆ map

struct dma_mapping gve_qpl::map

Page mapping.

Definition at line 526 of file gve.h.

Referenced by gve_alloc_qpl(), gve_free_qpl(), and gve_register().

◆ count

unsigned int gve_qpl::count

Number of pages.

Definition at line 528 of file gve.h.

Referenced by gve_alloc_qpl(), gve_free_qpl(), and gve_register().

◆ id

unsigned int gve_qpl::id

Queue page list ID.

Definition at line 530 of file gve.h.

Referenced by gve_alloc_qpl(), gve_register(), and gve_unregister().

◆ base

physaddr_t gve_qpl::base

Queue page list base device address.

This will be zero in the GQI-QPL operating mode, or the DMA address of the first page in any other operating mode. (Despite its name, DQO-QPL still requires the use of raw DMA addresses in transmit and receive descriptors.)

Definition at line 538 of file gve.h.

Referenced by gve_alloc_qpl().


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