mirror of
https://github.com/ultravioletrs/cocos.git
synced 2026-06-23 04:10:25 +00:00
* Fix condition to check for both SEVSNP and TDX configurations before copying firmware vars file Signed-off-by: Sammy Oina <sammyoina@gmail.com> * Fix TDXObject string formatting by removing unnecessary quotes Signed-off-by: Sammy Oina <sammyoina@gmail.com> --------- Signed-off-by: Sammy Oina <sammyoina@gmail.com>
This commit is contained in:
committed by
GitHub
parent
f52702b631
commit
79c66a89c3
@@ -12,7 +12,7 @@ import (
|
||||
const (
|
||||
BaseGuestCID = 3
|
||||
KernelCommandLine = "quiet console=null"
|
||||
TDXObject = "'{\"qom-type\":\"tdx-guest\",\"id\":\"%s\",\"quote-generation-socket\":{\"type\": \"vsock\", \"cid\":\"2\",\"port\":\"%d\"}}'"
|
||||
TDXObject = "{\"qom-type\":\"tdx-guest\",\"id\":\"%s\",\"quote-generation-socket\":{\"type\": \"vsock\", \"cid\":\"2\",\"port\":\"%d\"}}"
|
||||
)
|
||||
|
||||
type MemoryConfig struct {
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ func (v *qemuVM) Start() (err error) {
|
||||
v.vmi.Config.SEVConfig.ID = fmt.Sprintf("%s-%s", v.vmi.Config.SEVConfig.ID, id)
|
||||
v.vmi.Config.TDXConfig.ID = fmt.Sprintf("%s-%s", v.vmi.Config.TDXConfig.ID, id)
|
||||
|
||||
if !v.vmi.Config.EnableSEVSNP {
|
||||
if !v.vmi.Config.EnableSEVSNP && !v.vmi.Config.EnableTDX {
|
||||
// Copy firmware vars file.
|
||||
srcFile := v.vmi.Config.OVMFVarsConfig.File
|
||||
dstFile := fmt.Sprintf("%s/%s-%s.fd", tmpDir, firmwareVars, id)
|
||||
|
||||
Reference in New Issue
Block a user