mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-15 13:58:55 +00:00
runtime: qemu: tdx: Support mrconfigid / mrowner/ mrownerconfig
This is a quick and simple pre-req for supporting initData, which will take advantage of the mrconfigid in the TDX case. While already adding mrconfigid, which is hardcoded empty right now, let's do the same for mrowner and mrownerconfig, and leave it prepared for future expansions. Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
This commit is contained in:
@@ -437,6 +437,9 @@ type SocketAddress struct {
|
|||||||
type TdxQomObject struct {
|
type TdxQomObject struct {
|
||||||
QomType string `json:"qom-type"`
|
QomType string `json:"qom-type"`
|
||||||
Id string `json:"id"`
|
Id string `json:"id"`
|
||||||
|
MrConfigId string `json:"mrconfigid,omitempty"`
|
||||||
|
MrOwner string `json:"mrowner,omitempty"`
|
||||||
|
MrOwnerConfig string `json:"mrownerconfig,omitempty"`
|
||||||
QuoteGenerationSocket SocketAddress `json:"quote-generation-socket"`
|
QuoteGenerationSocket SocketAddress `json:"quote-generation-socket"`
|
||||||
Debug *bool `json:"debug,omitempty"`
|
Debug *bool `json:"debug,omitempty"`
|
||||||
}
|
}
|
||||||
@@ -465,7 +468,14 @@ func (this *TdxQomObject) String() string {
|
|||||||
|
|
||||||
func prepareTDXObject(object Object) string {
|
func prepareTDXObject(object Object) string {
|
||||||
qgsSocket := SocketAddress{"vsock", fmt.Sprint(VsockHostCid), fmt.Sprint(object.QgsPort)}
|
qgsSocket := SocketAddress{"vsock", fmt.Sprint(VsockHostCid), fmt.Sprint(object.QgsPort)}
|
||||||
tdxObject := TdxQomObject{string(object.Type), object.ID, qgsSocket, nil}
|
tdxObject := TdxQomObject{
|
||||||
|
string(object.Type), // qom-type
|
||||||
|
object.ID, // id
|
||||||
|
"", // mrconfigid
|
||||||
|
"", // mrowner
|
||||||
|
"", // mrownerconfig
|
||||||
|
qgsSocket, // quote-generation-socket
|
||||||
|
nil}
|
||||||
|
|
||||||
if object.Debug {
|
if object.Debug {
|
||||||
*tdxObject.Debug = true
|
*tdxObject.Debug = true
|
||||||
|
Reference in New Issue
Block a user