From 3e158001993cc2356d6ac084e6c82714210c9f24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Thu, 23 Mar 2023 21:21:49 +0100 Subject: [PATCH] govmm: Directly pass the firmware using -bios with TDX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since TDX doesn't support readonly memslot, TDVF cannot be mapped as pflash device and it actually works as RAM. "-bios" option is chosen to load TDVF. OVMF is the opensource firmware that implements the TDVF support. Thus the command line to specify and load TDVF is ``-bios OVMF.fd`` Signed-off-by: Fabiano FidĂȘncio --- src/runtime/pkg/govmm/qemu/qemu.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/runtime/pkg/govmm/qemu/qemu.go b/src/runtime/pkg/govmm/qemu/qemu.go index 520978b06f..06d7e58957 100644 --- a/src/runtime/pkg/govmm/qemu/qemu.go +++ b/src/runtime/pkg/govmm/qemu/qemu.go @@ -348,12 +348,7 @@ func (object Object) QemuParams(config *Config) []string { if object.Debug { objectParams = append(objectParams, "debug=on") } - deviceParams = append(deviceParams, string(object.Driver)) - deviceParams = append(deviceParams, fmt.Sprintf("id=%s", object.DeviceID)) - deviceParams = append(deviceParams, fmt.Sprintf("file=%s", object.File)) - if object.FirmwareVolume != "" { - deviceParams = append(deviceParams, fmt.Sprintf("config-firmware-volume=%s", object.FirmwareVolume)) - } + config.Bios = object.File case SEVGuest: fallthrough case SNPGuest: