runtime: qemu: Rename prepareObjectWithTDXQgs to prepareTDXObject

The reason we're relying on yet another function to do so is because the
TDX object will be used in its qom / qapi json format.

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
This commit is contained in:
Fabiano Fidêncio
2024-09-06 14:36:09 +02:00
parent 29ce2205a1
commit 8285957678

View File

@@ -376,7 +376,7 @@ func (object Object) QemuParams(config *Config) []string {
}
case TDXGuest:
objectParams = append(objectParams, prepareObjectWithTdxQgs(object))
objectParams = append(objectParams, prepareTDXObject(object))
config.Bios = object.File
case SEVGuest:
objectParams = append(objectParams, string(object.Type))
@@ -463,7 +463,7 @@ func (this *TdxQomObject) String() string {
return string(b)
}
func prepareObjectWithTdxQgs(object Object) string {
func prepareTDXObject(object Object) string {
qgsSocket := SocketAddress{"vsock", fmt.Sprint(VsockHostCid), fmt.Sprint(object.QgsPort)}
tdxObject := TdxQomObject{string(object.Type), object.ID, qgsSocket, nil}