Skip to content

Commit

Permalink
clh: update sev snp param
Browse files Browse the repository at this point in the history
Update the sev parameter to sev_snp in the cloud-hypervisor.yaml file to
match cloud-hypervisor 38.0.72.

See https://github.com/microsoft/cloud-hypervisor/blob/msft/v38.0.72/vmm
/src/config.rs#L687

Signed-off-by: Saul Paredes <saulparedes@microsoft.com>
  • Loading branch information
Redent0r committed May 29, 2024
1 parent a1c3b2c commit 57ab374
Show file tree
Hide file tree
Showing 7 changed files with 129 additions and 127 deletions.
2 changes: 1 addition & 1 deletion src/runtime/virtcontainers/clh.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ func (clh *cloudHypervisor) enableProtection() error {
if clh.vmconfig.Platform == nil {
clh.vmconfig.Platform = chclient.NewPlatformConfig()
}
clh.vmconfig.Platform.SetSnp(true)
clh.vmconfig.Platform.SetSevSnp(true)

if len(clh.config.PolicyHash) > 0 {
clh.vmconfig.Payload.SetHostData(clh.config.PolicyHash)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,8 @@ components:
- oem_strings
- oem_strings
tdx: false
snp: false
serial_number: serial_number
sev_snp: false
uuid: uuid
tpm:
socket: socket
Expand All @@ -664,10 +664,10 @@ components:
iommu: false
payload:
cmdline: cmdline
kernel: kernel
initramfs: initramfs
igvm: igvm
kernel: kernel
host_data: host_data
initramfs: initramfs
firmware: firmware
serial:
mode: "false"
Expand Down Expand Up @@ -801,10 +801,10 @@ components:
description: Payloads to boot in guest
example:
cmdline: cmdline
kernel: kernel
initramfs: initramfs
igvm: igvm
kernel: kernel
host_data: host_data
initramfs: initramfs
firmware: firmware
properties:
firmware:
Expand Down Expand Up @@ -1023,8 +1023,8 @@ components:
- oem_strings
- oem_strings
tdx: false
snp: false
serial_number: serial_number
sev_snp: false
uuid: uuid
tpm:
socket: socket
Expand All @@ -1045,10 +1045,10 @@ components:
iommu: false
payload:
cmdline: cmdline
kernel: kernel
initramfs: initramfs
igvm: igvm
kernel: kernel
host_data: host_data
initramfs: initramfs
firmware: firmware
serial:
mode: "false"
Expand Down Expand Up @@ -1262,8 +1262,8 @@ components:
- oem_strings
- oem_strings
tdx: false
snp: false
serial_number: serial_number
sev_snp: false
uuid: uuid
properties:
num_pci_segments:
Expand All @@ -1285,7 +1285,7 @@ components:
tdx:
default: false
type: boolean
snp:
sev_snp:
default: false
type: boolean
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Firmware** | Pointer to **string** | | [optional]
**Kernel** | Pointer to **string** | | [optional]
**Cmdline** | Pointer to **string** | | [optional]
**Initramfs** | Pointer to **string** | | [optional]
**Igvm** | Pointer to **string** | | [optional]
**HostData** | Pointer to **string** | | [optional]
**Firmware** | Pointer to **string** | | [optional]
**Kernel** | Pointer to **string** | | [optional]
**Cmdline** | Pointer to **string** | | [optional]
**Initramfs** | Pointer to **string** | | [optional]
**Igvm** | Pointer to **string** | | [optional]
**HostData** | Pointer to **string** | | [optional]

## Methods

Expand Down Expand Up @@ -180,6 +180,7 @@ SetHostData sets HostData field to given value.

HasHostData 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)


Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**NumPciSegments** | Pointer to **int32** | | [optional]
**IommuSegments** | Pointer to **[]int32** | | [optional]
**SerialNumber** | Pointer to **string** | | [optional]
**Uuid** | Pointer to **string** | | [optional]
**OemStrings** | Pointer to **[]string** | | [optional]
**NumPciSegments** | Pointer to **int32** | | [optional]
**IommuSegments** | Pointer to **[]int32** | | [optional]
**SerialNumber** | Pointer to **string** | | [optional]
**Uuid** | Pointer to **string** | | [optional]
**OemStrings** | Pointer to **[]string** | | [optional]
**Tdx** | Pointer to **bool** | | [optional] [default to false]
**Snp** | Pointer to **bool** | | [optional] [default to false]
**SevSnp** | Pointer to **bool** | | [optional] [default to false]

## Methods

Expand Down Expand Up @@ -181,30 +181,31 @@ SetTdx sets Tdx field to given value.

HasTdx returns a boolean if a field has been set.

### GetSnp
### GetSevSnp

`func (o *PlatformConfig) GetSnp() bool`
`func (o *PlatformConfig) GetSevSnp() bool`

GetSnp returns the Snp field if non-nil, zero value otherwise.
GetSevSnp returns the SevSnp field if non-nil, zero value otherwise.

### GetSnpOk
### GetSevSnpOk

`func (o *PlatformConfig) GetSnpOk() (*bool, bool)`
`func (o *PlatformConfig) GetSevSnpOk() (*bool, bool)`

GetSnpOk returns a tuple with the Snp field if it's non-nil, zero value otherwise
GetSevSnpOk returns a tuple with the SevSnp field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetSnp
### SetSevSnp

`func (o *PlatformConfig) SetSnp(v bool)`
`func (o *PlatformConfig) SetSevSnp(v bool)`

SetSnp sets Snp field to given value.
SetSevSnp sets SevSnp field to given value.

### HasSnp
### HasSevSnp

`func (o *PlatformConfig) HasSnp() bool`
`func (o *PlatformConfig) HasSevSnp() bool`

HasSevSnp returns a boolean if a field has been set.

HasSnp 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)

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 57ab374

Please sign in to comment.