mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-18 17:33:02 +00:00
runtime: clh: Use the new API to boot with TDX firmware (td-shim)
The new way to boot from TDX firmware (e.g. td-shim) is using the
combination of '--platform tdx=on' with '--firmware tdshim'.
Fixes: #5309
Signed-off-by: Bo Chen <chen.bo@intel.com>
(cherry picked from commit 067e2b1e33
)
This commit is contained in:
parent
f3eac35b55
commit
9a0ab92f65
@ -415,7 +415,13 @@ func (clh *cloudHypervisor) enableProtection() error {
|
||||
return errors.New("Firmware path is not specified")
|
||||
}
|
||||
|
||||
clh.vmconfig.Tdx = chclient.NewTdxConfig(firmwarePath)
|
||||
clh.vmconfig.Payload.SetFirmware(firmwarePath)
|
||||
|
||||
if clh.vmconfig.Platform == nil {
|
||||
clh.vmconfig.Platform = chclient.NewPlatformConfig()
|
||||
}
|
||||
clh.vmconfig.Platform.SetTdx(true)
|
||||
|
||||
return nil
|
||||
|
||||
case sevProtection:
|
||||
|
Loading…
Reference in New Issue
Block a user