Merge pull request #5322 from likebreath/1004/clh_v27_stable-2.5

Stable-2.5 | Upgrade to Cloud Hypervisor v27.0
This commit is contained in:
GabyCT 2022-10-05 10:13:02 -05:00 committed by GitHub
commit a9515c18d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 391 additions and 350 deletions

View File

@ -412,7 +412,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:

View File

@ -32,7 +32,6 @@ docs/RestoreConfig.md
docs/RngConfig.md
docs/SendMigrationData.md
docs/SgxEpcConfig.md
docs/TdxConfig.md
docs/TokenBucket.md
docs/VdpaConfig.md
docs/VmAddDevice.md
@ -73,7 +72,6 @@ model_restore_config.go
model_rng_config.go
model_send_migration_data.go
model_sgx_epc_config.go
model_tdx_config.go
model_token_bucket.go
model_vdpa_config.go
model_vm_add_device.go

View File

@ -134,7 +134,6 @@ Class | Method | HTTP request | Description
- [RngConfig](docs/RngConfig.md)
- [SendMigrationData](docs/SendMigrationData.md)
- [SgxEpcConfig](docs/SgxEpcConfig.md)
- [TdxConfig](docs/TdxConfig.md)
- [TokenBucket](docs/TokenBucket.md)
- [VdpaConfig](docs/VdpaConfig.md)
- [VmAddDevice](docs/VmAddDevice.md)

View File

@ -425,7 +425,7 @@ components:
VmInfo:
description: Virtual Machine information
example:
memory_actual_size: 3
memory_actual_size: 7
state: Created
config:
console:
@ -433,7 +433,7 @@ components:
file: file
iommu: false
balloon:
size: 6
size: 1
deflate_on_oom: false
free_page_reporting: false
memory:
@ -530,83 +530,81 @@ components:
- 3
- 3
devices:
- pci_segment: 6
- pci_segment: 3
path: path
iommu: false
id: id
- pci_segment: 6
- pci_segment: 3
path: path
iommu: false
id: id
vdpa:
- pci_segment: 3
- pci_segment: 7
path: path
num_queues: 3
iommu: false
id: id
- pci_segment: 3
- pci_segment: 7
path: path
num_queues: 3
iommu: false
id: id
numa:
- distances:
- distance: 8
destination: 4
- distance: 8
destination: 4
- distance: 7
destination: 8
- distance: 7
destination: 8
cpus:
- 0
- 0
- 4
- 4
sgx_epc_sections:
- sgx_epc_sections
- sgx_epc_sections
memory_zones:
- memory_zones
- memory_zones
guest_numa_id: 6
guest_numa_id: 0
- distances:
- distance: 8
destination: 4
- distance: 8
destination: 4
- distance: 7
destination: 8
- distance: 7
destination: 8
cpus:
- 0
- 0
- 4
- 4
sgx_epc_sections:
- sgx_epc_sections
- sgx_epc_sections
memory_zones:
- memory_zones
- memory_zones
guest_numa_id: 6
tdx:
firmware: firmware
guest_numa_id: 0
rng:
iommu: false
src: /dev/urandom
sgx_epc:
- prefault: false
size: 7
size: 6
id: id
- prefault: false
size: 7
size: 6
id: id
fs:
- pci_segment: 6
num_queues: 1
queue_size: 2
num_queues: 2
queue_size: 6
tag: tag
socket: socket
id: id
- pci_segment: 6
num_queues: 1
queue_size: 2
num_queues: 2
queue_size: 6
tag: tag
socket: socket
id: id
vsock:
pci_segment: 0
pci_segment: 7
iommu: false
socket: socket
id: id
@ -615,22 +613,23 @@ components:
iommu_segments:
- 3
- 3
num_pci_segments: 7
num_pci_segments: 3
oem_strings:
- oem_strings
- oem_strings
tdx: false
serial_number: serial_number
uuid: uuid
pmem:
- pci_segment: 5
- pci_segment: 6
file: file
size: 6
size: 5
iommu: false
id: id
discard_writes: false
- pci_segment: 5
- pci_segment: 6
file: file
size: 6
size: 5
iommu: false
id: id
discard_writes: false
@ -640,14 +639,16 @@ components:
cmdline: cmdline
kernel: kernel
initramfs: initramfs
firmware: firmware
serial:
mode: "false"
file: file
iommu: false
net:
- tap: tap
num_queues: 9
queue_size: 6
host_mac: host_mac
num_queues: 6
queue_size: 3
ip: 192.168.249.1
rate_limiter_config:
ops:
@ -659,7 +660,8 @@ components:
one_time_burst: 0
refill_time: 0
mac: mac
pci_segment: 3
mtu: 9
pci_segment: 6
vhost_mode: Client
iommu: false
vhost_socket: vhost_socket
@ -667,8 +669,9 @@ components:
id: id
mask: 255.255.255.0
- tap: tap
num_queues: 9
queue_size: 6
host_mac: host_mac
num_queues: 6
queue_size: 3
ip: 192.168.249.1
rate_limiter_config:
ops:
@ -680,7 +683,8 @@ components:
one_time_burst: 0
refill_time: 0
mac: mac
pci_segment: 3
mtu: 9
pci_segment: 6
vhost_mode: Client
iommu: false
vhost_socket: vhost_socket
@ -769,7 +773,10 @@ components:
cmdline: cmdline
kernel: kernel
initramfs: initramfs
firmware: firmware
properties:
firmware:
type: string
kernel:
type: string
cmdline:
@ -785,7 +792,7 @@ components:
file: file
iommu: false
balloon:
size: 6
size: 1
deflate_on_oom: false
free_page_reporting: false
memory:
@ -882,83 +889,81 @@ components:
- 3
- 3
devices:
- pci_segment: 6
- pci_segment: 3
path: path
iommu: false
id: id
- pci_segment: 6
- pci_segment: 3
path: path
iommu: false
id: id
vdpa:
- pci_segment: 3
- pci_segment: 7
path: path
num_queues: 3
iommu: false
id: id
- pci_segment: 3
- pci_segment: 7
path: path
num_queues: 3
iommu: false
id: id
numa:
- distances:
- distance: 8
destination: 4
- distance: 8
destination: 4
- distance: 7
destination: 8
- distance: 7
destination: 8
cpus:
- 0
- 0
- 4
- 4
sgx_epc_sections:
- sgx_epc_sections
- sgx_epc_sections
memory_zones:
- memory_zones
- memory_zones
guest_numa_id: 6
guest_numa_id: 0
- distances:
- distance: 8
destination: 4
- distance: 8
destination: 4
- distance: 7
destination: 8
- distance: 7
destination: 8
cpus:
- 0
- 0
- 4
- 4
sgx_epc_sections:
- sgx_epc_sections
- sgx_epc_sections
memory_zones:
- memory_zones
- memory_zones
guest_numa_id: 6
tdx:
firmware: firmware
guest_numa_id: 0
rng:
iommu: false
src: /dev/urandom
sgx_epc:
- prefault: false
size: 7
size: 6
id: id
- prefault: false
size: 7
size: 6
id: id
fs:
- pci_segment: 6
num_queues: 1
queue_size: 2
num_queues: 2
queue_size: 6
tag: tag
socket: socket
id: id
- pci_segment: 6
num_queues: 1
queue_size: 2
num_queues: 2
queue_size: 6
tag: tag
socket: socket
id: id
vsock:
pci_segment: 0
pci_segment: 7
iommu: false
socket: socket
id: id
@ -967,22 +972,23 @@ components:
iommu_segments:
- 3
- 3
num_pci_segments: 7
num_pci_segments: 3
oem_strings:
- oem_strings
- oem_strings
tdx: false
serial_number: serial_number
uuid: uuid
pmem:
- pci_segment: 5
- pci_segment: 6
file: file
size: 6
size: 5
iommu: false
id: id
discard_writes: false
- pci_segment: 5
- pci_segment: 6
file: file
size: 6
size: 5
iommu: false
id: id
discard_writes: false
@ -992,14 +998,16 @@ components:
cmdline: cmdline
kernel: kernel
initramfs: initramfs
firmware: firmware
serial:
mode: "false"
file: file
iommu: false
net:
- tap: tap
num_queues: 9
queue_size: 6
host_mac: host_mac
num_queues: 6
queue_size: 3
ip: 192.168.249.1
rate_limiter_config:
ops:
@ -1011,7 +1019,8 @@ components:
one_time_burst: 0
refill_time: 0
mac: mac
pci_segment: 3
mtu: 9
pci_segment: 6
vhost_mode: Client
iommu: false
vhost_socket: vhost_socket
@ -1019,8 +1028,9 @@ components:
id: id
mask: 255.255.255.0
- tap: tap
num_queues: 9
queue_size: 6
host_mac: host_mac
num_queues: 6
queue_size: 3
ip: 192.168.249.1
rate_limiter_config:
ops:
@ -1032,7 +1042,8 @@ components:
one_time_burst: 0
refill_time: 0
mac: mac
pci_segment: 3
mtu: 9
pci_segment: 6
vhost_mode: Client
iommu: false
vhost_socket: vhost_socket
@ -1084,8 +1095,6 @@ components:
items:
$ref: '#/components/schemas/SgxEpcConfig'
type: array
tdx:
$ref: '#/components/schemas/TdxConfig'
numa:
items:
$ref: '#/components/schemas/NumaConfig'
@ -1191,10 +1200,11 @@ components:
iommu_segments:
- 3
- 3
num_pci_segments: 7
num_pci_segments: 3
oem_strings:
- oem_strings
- oem_strings
tdx: false
serial_number: serial_number
uuid: uuid
properties:
@ -1214,6 +1224,9 @@ components:
items:
type: string
type: array
tdx:
default: false
type: boolean
type: object
MemoryZoneConfig:
example:
@ -1442,8 +1455,9 @@ components:
NetConfig:
example:
tap: tap
num_queues: 9
queue_size: 6
host_mac: host_mac
num_queues: 6
queue_size: 3
ip: 192.168.249.1
rate_limiter_config:
ops:
@ -1455,7 +1469,8 @@ components:
one_time_burst: 0
refill_time: 0
mac: mac
pci_segment: 3
mtu: 9
pci_segment: 6
vhost_mode: Client
iommu: false
vhost_socket: vhost_socket
@ -1473,6 +1488,10 @@ components:
type: string
mac:
type: string
host_mac:
type: string
mtu:
type: integer
iommu:
default: false
type: boolean
@ -1514,7 +1533,7 @@ components:
type: object
BalloonConfig:
example:
size: 6
size: 1
deflate_on_oom: false
free_page_reporting: false
properties:
@ -1535,8 +1554,8 @@ components:
FsConfig:
example:
pci_segment: 6
num_queues: 1
queue_size: 2
num_queues: 2
queue_size: 6
tag: tag
socket: socket
id: id
@ -1564,9 +1583,9 @@ components:
type: object
PmemConfig:
example:
pci_segment: 5
pci_segment: 6
file: file
size: 6
size: 5
iommu: false
id: id
discard_writes: false
@ -1614,7 +1633,7 @@ components:
type: object
DeviceConfig:
example:
pci_segment: 6
pci_segment: 3
path: path
iommu: false
id: id
@ -1634,7 +1653,7 @@ components:
type: object
VdpaConfig:
example:
pci_segment: 3
pci_segment: 7
path: path
num_queues: 3
iommu: false
@ -1659,7 +1678,7 @@ components:
type: object
VsockConfig:
example:
pci_segment: 0
pci_segment: 7
iommu: false
socket: socket
id: id
@ -1688,7 +1707,7 @@ components:
SgxEpcConfig:
example:
prefault: false
size: 7
size: 6
id: id
properties:
id:
@ -1703,21 +1722,10 @@ components:
- id
- size
type: object
TdxConfig:
example:
firmware: firmware
properties:
firmware:
description: Path to the firmware that will be used to boot the TDx guest
up.
type: string
required:
- firmware
type: object
NumaDistance:
example:
distance: 8
destination: 4
distance: 7
destination: 8
properties:
destination:
format: int32
@ -1732,20 +1740,20 @@ components:
NumaConfig:
example:
distances:
- distance: 8
destination: 4
- distance: 8
destination: 4
- distance: 7
destination: 8
- distance: 7
destination: 8
cpus:
- 0
- 0
- 4
- 4
sgx_epc_sections:
- sgx_epc_sections
- sgx_epc_sections
memory_zones:
- memory_zones
- memory_zones
guest_numa_id: 6
guest_numa_id: 0
properties:
guest_numa_id:
format: int32

View File

@ -8,6 +8,8 @@ Name | Type | Description | Notes
**Ip** | Pointer to **string** | | [optional] [default to "192.168.249.1"]
**Mask** | Pointer to **string** | | [optional] [default to "255.255.255.0"]
**Mac** | Pointer to **string** | | [optional]
**HostMac** | Pointer to **string** | | [optional]
**Mtu** | Pointer to **int32** | | [optional]
**Iommu** | Pointer to **bool** | | [optional] [default to false]
**NumQueues** | Pointer to **int32** | | [optional] [default to 2]
**QueueSize** | Pointer to **int32** | | [optional] [default to 256]
@ -137,6 +139,56 @@ SetMac sets Mac field to given value.
HasMac returns a boolean if a field has been set.
### GetHostMac
`func (o *NetConfig) GetHostMac() string`
GetHostMac returns the HostMac field if non-nil, zero value otherwise.
### GetHostMacOk
`func (o *NetConfig) GetHostMacOk() (*string, bool)`
GetHostMacOk returns a tuple with the HostMac field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetHostMac
`func (o *NetConfig) SetHostMac(v string)`
SetHostMac sets HostMac field to given value.
### HasHostMac
`func (o *NetConfig) HasHostMac() bool`
HasHostMac returns a boolean if a field has been set.
### GetMtu
`func (o *NetConfig) GetMtu() int32`
GetMtu returns the Mtu field if non-nil, zero value otherwise.
### GetMtuOk
`func (o *NetConfig) GetMtuOk() (*int32, bool)`
GetMtuOk returns a tuple with the Mtu field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetMtu
`func (o *NetConfig) SetMtu(v int32)`
SetMtu sets Mtu field to given value.
### HasMtu
`func (o *NetConfig) HasMtu() bool`
HasMtu returns a boolean if a field has been set.
### GetIommu
`func (o *NetConfig) GetIommu() bool`

View File

@ -4,6 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Firmware** | Pointer to **string** | | [optional]
**Kernel** | Pointer to **string** | | [optional]
**Cmdline** | Pointer to **string** | | [optional]
**Initramfs** | Pointer to **string** | | [optional]
@ -27,6 +28,31 @@ NewPayloadConfigWithDefaults instantiates a new PayloadConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetFirmware
`func (o *PayloadConfig) GetFirmware() string`
GetFirmware returns the Firmware field if non-nil, zero value otherwise.
### GetFirmwareOk
`func (o *PayloadConfig) GetFirmwareOk() (*string, bool)`
GetFirmwareOk returns a tuple with the Firmware field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetFirmware
`func (o *PayloadConfig) SetFirmware(v string)`
SetFirmware sets Firmware field to given value.
### HasFirmware
`func (o *PayloadConfig) HasFirmware() bool`
HasFirmware returns a boolean if a field has been set.
### GetKernel
`func (o *PayloadConfig) GetKernel() string`

View File

@ -9,6 +9,7 @@ Name | Type | Description | Notes
**SerialNumber** | Pointer to **string** | | [optional]
**Uuid** | Pointer to **string** | | [optional]
**OemStrings** | Pointer to **[]string** | | [optional]
**Tdx** | Pointer to **bool** | | [optional] [default to false]
## Methods
@ -154,6 +155,31 @@ SetOemStrings sets OemStrings field to given value.
HasOemStrings returns a boolean if a field has been set.
### GetTdx
`func (o *PlatformConfig) GetTdx() bool`
GetTdx returns the Tdx field if non-nil, zero value otherwise.
### GetTdxOk
`func (o *PlatformConfig) GetTdxOk() (*bool, bool)`
GetTdxOk returns a tuple with the Tdx field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTdx
`func (o *PlatformConfig) SetTdx(v bool)`
SetTdx sets Tdx field to given value.
### HasTdx
`func (o *PlatformConfig) HasTdx() bool`
HasTdx returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,51 +0,0 @@
# TdxConfig
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Firmware** | **string** | Path to the firmware that will be used to boot the TDx guest up. |
## Methods
### NewTdxConfig
`func NewTdxConfig(firmware string, ) *TdxConfig`
NewTdxConfig instantiates a new TdxConfig object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewTdxConfigWithDefaults
`func NewTdxConfigWithDefaults() *TdxConfig`
NewTdxConfigWithDefaults instantiates a new TdxConfig object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetFirmware
`func (o *TdxConfig) GetFirmware() string`
GetFirmware returns the Firmware field if non-nil, zero value otherwise.
### GetFirmwareOk
`func (o *TdxConfig) GetFirmwareOk() (*string, bool)`
GetFirmwareOk returns a tuple with the Firmware field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetFirmware
`func (o *TdxConfig) SetFirmware(v string)`
SetFirmware sets Firmware field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -19,7 +19,6 @@ Name | Type | Description | Notes
**Vdpa** | Pointer to [**[]VdpaConfig**](VdpaConfig.md) | | [optional]
**Vsock** | Pointer to [**VsockConfig**](VsockConfig.md) | | [optional]
**SgxEpc** | Pointer to [**[]SgxEpcConfig**](SgxEpcConfig.md) | | [optional]
**Tdx** | Pointer to [**TdxConfig**](TdxConfig.md) | | [optional]
**Numa** | Pointer to [**[]NumaConfig**](NumaConfig.md) | | [optional]
**Iommu** | Pointer to **bool** | | [optional] [default to false]
**Watchdog** | Pointer to **bool** | | [optional] [default to false]
@ -414,31 +413,6 @@ SetSgxEpc sets SgxEpc field to given value.
HasSgxEpc returns a boolean if a field has been set.
### GetTdx
`func (o *VmConfig) GetTdx() TdxConfig`
GetTdx returns the Tdx field if non-nil, zero value otherwise.
### GetTdxOk
`func (o *VmConfig) GetTdxOk() (*TdxConfig, bool)`
GetTdxOk returns a tuple with the Tdx field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTdx
`func (o *VmConfig) SetTdx(v TdxConfig)`
SetTdx sets Tdx field to given value.
### HasTdx
`func (o *VmConfig) HasTdx() bool`
HasTdx returns a boolean if a field has been set.
### GetNuma
`func (o *VmConfig) GetNuma() []NumaConfig`

View File

@ -20,6 +20,8 @@ type NetConfig struct {
Ip *string `json:"ip,omitempty"`
Mask *string `json:"mask,omitempty"`
Mac *string `json:"mac,omitempty"`
HostMac *string `json:"host_mac,omitempty"`
Mtu *int32 `json:"mtu,omitempty"`
Iommu *bool `json:"iommu,omitempty"`
NumQueues *int32 `json:"num_queues,omitempty"`
QueueSize *int32 `json:"queue_size,omitempty"`
@ -204,6 +206,70 @@ func (o *NetConfig) SetMac(v string) {
o.Mac = &v
}
// GetHostMac returns the HostMac field value if set, zero value otherwise.
func (o *NetConfig) GetHostMac() string {
if o == nil || o.HostMac == nil {
var ret string
return ret
}
return *o.HostMac
}
// GetHostMacOk returns a tuple with the HostMac field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetConfig) GetHostMacOk() (*string, bool) {
if o == nil || o.HostMac == nil {
return nil, false
}
return o.HostMac, true
}
// HasHostMac returns a boolean if a field has been set.
func (o *NetConfig) HasHostMac() bool {
if o != nil && o.HostMac != nil {
return true
}
return false
}
// SetHostMac gets a reference to the given string and assigns it to the HostMac field.
func (o *NetConfig) SetHostMac(v string) {
o.HostMac = &v
}
// GetMtu returns the Mtu field value if set, zero value otherwise.
func (o *NetConfig) GetMtu() int32 {
if o == nil || o.Mtu == nil {
var ret int32
return ret
}
return *o.Mtu
}
// GetMtuOk returns a tuple with the Mtu field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetConfig) GetMtuOk() (*int32, bool) {
if o == nil || o.Mtu == nil {
return nil, false
}
return o.Mtu, true
}
// HasMtu returns a boolean if a field has been set.
func (o *NetConfig) HasMtu() bool {
if o != nil && o.Mtu != nil {
return true
}
return false
}
// SetMtu gets a reference to the given int32 and assigns it to the Mtu field.
func (o *NetConfig) SetMtu(v int32) {
o.Mtu = &v
}
// GetIommu returns the Iommu field value if set, zero value otherwise.
func (o *NetConfig) GetIommu() bool {
if o == nil || o.Iommu == nil {
@ -506,6 +572,12 @@ func (o NetConfig) MarshalJSON() ([]byte, error) {
if o.Mac != nil {
toSerialize["mac"] = o.Mac
}
if o.HostMac != nil {
toSerialize["host_mac"] = o.HostMac
}
if o.Mtu != nil {
toSerialize["mtu"] = o.Mtu
}
if o.Iommu != nil {
toSerialize["iommu"] = o.Iommu
}

View File

@ -16,6 +16,7 @@ import (
// PayloadConfig Payloads to boot in guest
type PayloadConfig struct {
Firmware *string `json:"firmware,omitempty"`
Kernel *string `json:"kernel,omitempty"`
Cmdline *string `json:"cmdline,omitempty"`
Initramfs *string `json:"initramfs,omitempty"`
@ -38,6 +39,38 @@ func NewPayloadConfigWithDefaults() *PayloadConfig {
return &this
}
// GetFirmware returns the Firmware field value if set, zero value otherwise.
func (o *PayloadConfig) GetFirmware() string {
if o == nil || o.Firmware == nil {
var ret string
return ret
}
return *o.Firmware
}
// GetFirmwareOk returns a tuple with the Firmware field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PayloadConfig) GetFirmwareOk() (*string, bool) {
if o == nil || o.Firmware == nil {
return nil, false
}
return o.Firmware, true
}
// HasFirmware returns a boolean if a field has been set.
func (o *PayloadConfig) HasFirmware() bool {
if o != nil && o.Firmware != nil {
return true
}
return false
}
// SetFirmware gets a reference to the given string and assigns it to the Firmware field.
func (o *PayloadConfig) SetFirmware(v string) {
o.Firmware = &v
}
// GetKernel returns the Kernel field value if set, zero value otherwise.
func (o *PayloadConfig) GetKernel() string {
if o == nil || o.Kernel == nil {
@ -136,6 +169,9 @@ func (o *PayloadConfig) SetInitramfs(v string) {
func (o PayloadConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Firmware != nil {
toSerialize["firmware"] = o.Firmware
}
if o.Kernel != nil {
toSerialize["kernel"] = o.Kernel
}

View File

@ -21,6 +21,7 @@ type PlatformConfig struct {
SerialNumber *string `json:"serial_number,omitempty"`
Uuid *string `json:"uuid,omitempty"`
OemStrings *[]string `json:"oem_strings,omitempty"`
Tdx *bool `json:"tdx,omitempty"`
}
// NewPlatformConfig instantiates a new PlatformConfig object
@ -29,6 +30,8 @@ type PlatformConfig struct {
// will change when the set of required properties is changed
func NewPlatformConfig() *PlatformConfig {
this := PlatformConfig{}
var tdx bool = false
this.Tdx = &tdx
return &this
}
@ -37,6 +40,8 @@ func NewPlatformConfig() *PlatformConfig {
// but it doesn't guarantee that properties required by API are set
func NewPlatformConfigWithDefaults() *PlatformConfig {
this := PlatformConfig{}
var tdx bool = false
this.Tdx = &tdx
return &this
}
@ -200,6 +205,38 @@ func (o *PlatformConfig) SetOemStrings(v []string) {
o.OemStrings = &v
}
// GetTdx returns the Tdx field value if set, zero value otherwise.
func (o *PlatformConfig) GetTdx() bool {
if o == nil || o.Tdx == nil {
var ret bool
return ret
}
return *o.Tdx
}
// GetTdxOk returns a tuple with the Tdx field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PlatformConfig) GetTdxOk() (*bool, bool) {
if o == nil || o.Tdx == nil {
return nil, false
}
return o.Tdx, true
}
// HasTdx returns a boolean if a field has been set.
func (o *PlatformConfig) HasTdx() bool {
if o != nil && o.Tdx != nil {
return true
}
return false
}
// SetTdx gets a reference to the given bool and assigns it to the Tdx field.
func (o *PlatformConfig) SetTdx(v bool) {
o.Tdx = &v
}
func (o PlatformConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.NumPciSegments != nil {
@ -217,6 +254,9 @@ func (o PlatformConfig) MarshalJSON() ([]byte, error) {
if o.OemStrings != nil {
toSerialize["oem_strings"] = o.OemStrings
}
if o.Tdx != nil {
toSerialize["tdx"] = o.Tdx
}
return json.Marshal(toSerialize)
}

View File

@ -1,107 +0,0 @@
/*
Cloud Hypervisor API
Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
API version: 0.3.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// TdxConfig struct for TdxConfig
type TdxConfig struct {
// Path to the firmware that will be used to boot the TDx guest up.
Firmware string `json:"firmware"`
}
// NewTdxConfig instantiates a new TdxConfig object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewTdxConfig(firmware string) *TdxConfig {
this := TdxConfig{}
this.Firmware = firmware
return &this
}
// NewTdxConfigWithDefaults instantiates a new TdxConfig object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewTdxConfigWithDefaults() *TdxConfig {
this := TdxConfig{}
return &this
}
// GetFirmware returns the Firmware field value
func (o *TdxConfig) GetFirmware() string {
if o == nil {
var ret string
return ret
}
return o.Firmware
}
// GetFirmwareOk returns a tuple with the Firmware field value
// and a boolean to check if the value has been set.
func (o *TdxConfig) GetFirmwareOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Firmware, true
}
// SetFirmware sets field value
func (o *TdxConfig) SetFirmware(v string) {
o.Firmware = v
}
func (o TdxConfig) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["firmware"] = o.Firmware
}
return json.Marshal(toSerialize)
}
type NullableTdxConfig struct {
value *TdxConfig
isSet bool
}
func (v NullableTdxConfig) Get() *TdxConfig {
return v.value
}
func (v *NullableTdxConfig) Set(val *TdxConfig) {
v.value = val
v.isSet = true
}
func (v NullableTdxConfig) IsSet() bool {
return v.isSet
}
func (v *NullableTdxConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTdxConfig(val *TdxConfig) *NullableTdxConfig {
return &NullableTdxConfig{value: val, isSet: true}
}
func (v NullableTdxConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTdxConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -31,7 +31,6 @@ type VmConfig struct {
Vdpa *[]VdpaConfig `json:"vdpa,omitempty"`
Vsock *VsockConfig `json:"vsock,omitempty"`
SgxEpc *[]SgxEpcConfig `json:"sgx_epc,omitempty"`
Tdx *TdxConfig `json:"tdx,omitempty"`
Numa *[]NumaConfig `json:"numa,omitempty"`
Iommu *bool `json:"iommu,omitempty"`
Watchdog *bool `json:"watchdog,omitempty"`
@ -536,38 +535,6 @@ func (o *VmConfig) SetSgxEpc(v []SgxEpcConfig) {
o.SgxEpc = &v
}
// GetTdx returns the Tdx field value if set, zero value otherwise.
func (o *VmConfig) GetTdx() TdxConfig {
if o == nil || o.Tdx == nil {
var ret TdxConfig
return ret
}
return *o.Tdx
}
// GetTdxOk returns a tuple with the Tdx field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VmConfig) GetTdxOk() (*TdxConfig, bool) {
if o == nil || o.Tdx == nil {
return nil, false
}
return o.Tdx, true
}
// HasTdx returns a boolean if a field has been set.
func (o *VmConfig) HasTdx() bool {
if o != nil && o.Tdx != nil {
return true
}
return false
}
// SetTdx gets a reference to the given TdxConfig and assigns it to the Tdx field.
func (o *VmConfig) SetTdx(v TdxConfig) {
o.Tdx = &v
}
// GetNuma returns the Numa field value if set, zero value otherwise.
func (o *VmConfig) GetNuma() []NumaConfig {
if o == nil || o.Numa == nil {
@ -743,9 +710,6 @@ func (o VmConfig) MarshalJSON() ([]byte, error) {
if o.SgxEpc != nil {
toSerialize["sgx_epc"] = o.SgxEpc
}
if o.Tdx != nil {
toSerialize["tdx"] = o.Tdx
}
if o.Numa != nil {
toSerialize["numa"] = o.Numa
}

View File

@ -502,6 +502,8 @@ components:
PayloadConfig:
type: object
properties:
firmware:
type: string
kernel:
type: string
cmdline:
@ -559,8 +561,6 @@ components:
type: array
items:
$ref: "#/components/schemas/SgxEpcConfig"
tdx:
$ref: "#/components/schemas/TdxConfig"
numa:
type: array
items:
@ -650,6 +650,9 @@ components:
type: array
items:
type: string
tdx:
type: boolean
default: false
MemoryZoneConfig:
required:
@ -818,6 +821,10 @@ components:
default: "255.255.255.0"
mac:
type: string
host_mac:
type: string
mtu:
type: integer
iommu:
type: boolean
default: false
@ -1006,15 +1013,6 @@ components:
type: boolean
default: false
TdxConfig:
required:
- firmware
type: object
properties:
firmware:
type: string
description: Path to the firmware that will be used to boot the TDx guest up.
NumaDistance:
required:
- destination

View File

@ -75,7 +75,7 @@ assets:
url: "https://github.com/cloud-hypervisor/cloud-hypervisor"
uscan-url: >-
https://github.com/cloud-hypervisor/cloud-hypervisor/tags.*/v?(\d\S+)\.tar\.gz
version: "v26.0"
version: "2115a4156891804e5fc7bbd0d1831d2e92a0c50e"
firecracker:
description: "Firecracker micro-VMM"