govmm: Directly pass the firmware using -bios with TDX

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 <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio 2023-03-23 21:21:49 +01:00
parent 3c5ffb0c85
commit 3e15800199

View File

@ -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: