GPU Configuration#

This section describes the GPU virtualization configuration for DriveOS PCT. It focuses exclusively on the SR-IOV-based GPU server.

The format is defined in:

${NV_WORKSPACE}/drive-foundation/virtualization/virt/libvirt/include/pct/pct.h

GPU Server Configuration#

gpu_server_config is specified in platform_config.h.

  • pid: Mandatory. Process ID of the GPU server.

  • carveout_size: Mandatory. Amount of memory reserved for the GPU server process.

  • enable_gsp_scheduler_vm: Optional with default value false. Indicates whether the GSP VM Scheduler is enabled. This must be enabled for multi-VM GPU access; for single VM usage, it is optional.

  • nvlog_buf_size: Optional with default value 0 (disabled). Size of the nvlog buffer for the GPU server. This option requires ENABLE_HVRTOS_NVLOG_SERVER to be defined. The minimum per-thread nvlog buffer size is 0x4520. The recommended size is (PLAT_NR_CPU + 1) * 0x4520.

  • disable_debug_log: Optional with default value false. When set to true, disables debug logging in the GPU server. It is recommended to set this to true for production builds and false for development builds.

Guest VM Configuration#

gpu_conf is the GPU configuration for each guest VM, and is in the file guest_config.h.

  • channel_pool: Optional with default no GPU access. The channel id range assigned to the guest VM. If the range is zero which means the guest VM does not have GPU access, other fields are ignored.

  • vf_epid_mask: Mandatory if channel_pool is set. Specify what engines assigned the guest VM. Going to be deprecated.

  • vf_engine_assignment: Mandatory. Describes a list of gpu engines vf_gpu_engine supported on a VM and respective timeslices. When vf_engine_id is 0, then it will be considered as end of the list. vf_gpu_engine format:

    • vf_engine_id: GPU engine id and instance number supported on a VM. Encoded using GPU_ENGINE macro. 0 will be considered as invalid.

GPU Server Device Tree#

  • gpu-engine-timeout: Optional with default value 500. GPU engine timeout in milliseconds.

  • dma-coherent: Mandatory. Indicates that the GPU supports DMA coherency.

  • support-gpu-tools: Optional with default value 1. Indicates that the GPU supports GPU dev tools. It is recommended to enable this option on development NSR (dev-nsr) and disable it on production NSR (nsr).

  • status: Optional with default value okay. Must be okay to enable the GPU.