From fc81c79cabe5dfc28dfdbc67eb31fdb6b75ec00d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Sat, 18 Jul 2026 13:04:58 +0200 Subject: [PATCH] runtime-rs: do not require OVMF for qemu-nvidia-cpu-runtime-rs on arm64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit e8bb619b1ba6 ("runtime: do not require OVMF for qemu-nvidia-cpu on arm64") dropped the generic OVMF/AAVMF firmware inheritance for the Go qemu-nvidia-cpu runtime, but assumed runtime-rs already did the right thing by default. It didn't: the runtime-rs profile still pointed at the generic @FIRMWAREPATH@ / @FIRMWAREVOLUMEPATH@ and still pulled in the ovmf component on aarch64. Mirror the fix on the runtime-rs side by introducing dedicated empty FIRMWAREPATH_NV_CPU / FIRMWAREVOLUMEPATH_NV_CPU variables, wiring them into the qemu-nvidia-cpu-runtime-rs configuration, and dropping ovmf from its aarch64 shim components. Signed-off-by: Fabiano FidĂȘncio Assisted-by: Cursor with Claude Opus 4.8 --- src/runtime-rs/Makefile | 8 ++++++++ .../configuration-qemu-nvidia-cpu-runtime-rs.toml.in | 4 ++-- tools/packaging/kata-deploy/shim-components.json | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/runtime-rs/Makefile b/src/runtime-rs/Makefile index 6bd8f71138..5250633d4e 100644 --- a/src/runtime-rs/Makefile +++ b/src/runtime-rs/Makefile @@ -149,6 +149,12 @@ ifeq ($(ARCH), aarch64) FIRMWAREPATH_NV := $(PREFIXDEPS)/share/$(EDK2_NAME)/AAVMF_CODE.fd endif +# The CPU-only NVIDIA runtime class does not need UEFI firmware (no OVMF/AAVMF). +# Use dedicated empty variables so it does not inherit the generic firmware +# paths; parity with src/runtime/Makefile FIRMWAREPATH_NV_CPU. +FIRMWAREPATH_NV_CPU := +FIRMWAREVOLUMEPATH_NV_CPU := + KERNELVERITYPARAMS ?= "" # TDX @@ -704,7 +710,9 @@ USER_VARS += KERNELPATH USER_VARS += KERNELVIRTIOFSPATH USER_VARS += FIRMWAREPATH USER_VARS += FIRMWAREPATH_NV +USER_VARS += FIRMWAREPATH_NV_CPU USER_VARS += FIRMWAREVOLUMEPATH +USER_VARS += FIRMWAREVOLUMEPATH_NV_CPU USER_VARS += MACHINEACCELERATORS USER_VARS += CPUFEATURES USER_VARS += DEFMACHINETYPE_CLH diff --git a/src/runtime-rs/config/configuration-qemu-nvidia-cpu-runtime-rs.toml.in b/src/runtime-rs/config/configuration-qemu-nvidia-cpu-runtime-rs.toml.in index e14cc533f9..899e469169 100644 --- a/src/runtime-rs/config/configuration-qemu-nvidia-cpu-runtime-rs.toml.in +++ b/src/runtime-rs/config/configuration-qemu-nvidia-cpu-runtime-rs.toml.in @@ -65,13 +65,13 @@ kernel_verity_params = "@KERNELVERITYPARAMS_NV@" # Path to the firmware. # If you want that qemu uses the default firmware leave this option empty -firmware = "@FIRMWAREPATH@" +firmware = "@FIRMWAREPATH_NV_CPU@" # Path to the firmware volume. # firmware TDVF or OVMF can be split into FIRMWARE_VARS.fd (UEFI variables # as configuration) and FIRMWARE_CODE.fd (UEFI program image). UEFI variables # can be customized per each user while UEFI code is kept same. -firmware_volume = "@FIRMWAREVOLUMEPATH@" +firmware_volume = "@FIRMWAREVOLUMEPATH_NV_CPU@" # Machine accelerators # comma-separated list of machine accelerators to pass to the hypervisor. diff --git a/tools/packaging/kata-deploy/shim-components.json b/tools/packaging/kata-deploy/shim-components.json index 3ef05a82b2..085aa8ed06 100644 --- a/tools/packaging/kata-deploy/shim-components.json +++ b/tools/packaging/kata-deploy/shim-components.json @@ -45,7 +45,7 @@ }, "qemu-nvidia-cpu-runtime-rs": { "x86_64": ["shim-v2-rust", "qemu", "virtiofsd", "kernel-nvidia-gpu", "rootfs-image-nvidia"], - "aarch64": ["shim-v2-rust", "qemu", "virtiofsd", "kernel-nvidia-gpu", "rootfs-image-nvidia", "ovmf"] + "aarch64": ["shim-v2-rust", "qemu", "virtiofsd", "kernel-nvidia-gpu", "rootfs-image-nvidia"] }, "qemu-nvidia-gpu-snp": { "x86_64": ["shim-v2-go", "qemu-snp-experimental", "kernel-nvidia-gpu", "rootfs-image-nvidia-gpu-confidential", "ovmf-sev"]