mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-01 05:04:26 +00:00
runtime/virtcontrainers: fix alignment structures
fix alignment of qemuArchBase and HypervisorConfig structures Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
parent
6be8bf5c66
commit
361bee91f7
@ -222,6 +222,10 @@ type Param struct {
|
|||||||
|
|
||||||
// HypervisorConfig is the hypervisor configuration.
|
// HypervisorConfig is the hypervisor configuration.
|
||||||
type HypervisorConfig struct {
|
type HypervisorConfig struct {
|
||||||
|
// PCIeRootPort is used to indicate the number of PCIe Root Port devices
|
||||||
|
// The PCIe Root Port device is used to hot-plug the PCIe device
|
||||||
|
PCIeRootPort uint32
|
||||||
|
|
||||||
// NumVCPUs specifies default number of vCPUs for the VM.
|
// NumVCPUs specifies default number of vCPUs for the VM.
|
||||||
NumVCPUs uint32
|
NumVCPUs uint32
|
||||||
|
|
||||||
@ -241,9 +245,6 @@ type HypervisorConfig struct {
|
|||||||
// MemSlots specifies default memory slots the VM.
|
// MemSlots specifies default memory slots the VM.
|
||||||
MemSlots uint32
|
MemSlots uint32
|
||||||
|
|
||||||
// MemOffset specifies memory space for nvdimm device
|
|
||||||
MemOffset uint64
|
|
||||||
|
|
||||||
// VirtioFSCacheSize is the DAX cache size in MiB
|
// VirtioFSCacheSize is the DAX cache size in MiB
|
||||||
VirtioFSCacheSize uint32
|
VirtioFSCacheSize uint32
|
||||||
|
|
||||||
@ -310,9 +311,6 @@ type HypervisorConfig struct {
|
|||||||
// entropy (/dev/random, /dev/urandom or real hardware RNG device)
|
// entropy (/dev/random, /dev/urandom or real hardware RNG device)
|
||||||
EntropySource string
|
EntropySource string
|
||||||
|
|
||||||
// EntropySourceList is the list of valid entropy sources
|
|
||||||
EntropySourceList []string
|
|
||||||
|
|
||||||
// Shared file system type:
|
// Shared file system type:
|
||||||
// - virtio-9p (default)
|
// - virtio-9p (default)
|
||||||
// - virtio-fs
|
// - virtio-fs
|
||||||
@ -321,6 +319,12 @@ type HypervisorConfig struct {
|
|||||||
// VirtioFSDaemon is the virtio-fs vhost-user daemon path
|
// VirtioFSDaemon is the virtio-fs vhost-user daemon path
|
||||||
VirtioFSDaemon string
|
VirtioFSDaemon string
|
||||||
|
|
||||||
|
// File based memory backend root directory
|
||||||
|
FileBackedMemRootDir string
|
||||||
|
|
||||||
|
// EntropySourceList is the list of valid entropy sources
|
||||||
|
EntropySourceList []string
|
||||||
|
|
||||||
// VirtioFSDaemonList is the list of valid virtiofs names for annotations
|
// VirtioFSDaemonList is the list of valid virtiofs names for annotations
|
||||||
VirtioFSDaemonList []string
|
VirtioFSDaemonList []string
|
||||||
|
|
||||||
@ -330,8 +334,8 @@ type HypervisorConfig struct {
|
|||||||
// VirtioFSExtraArgs passes options to virtiofsd daemon
|
// VirtioFSExtraArgs passes options to virtiofsd daemon
|
||||||
VirtioFSExtraArgs []string
|
VirtioFSExtraArgs []string
|
||||||
|
|
||||||
// File based memory backend root directory
|
// Enable annotations by name
|
||||||
FileBackedMemRootDir string
|
EnableAnnotations []string
|
||||||
|
|
||||||
// FileBackedMemRootList is the list of valid root directories values for annotations
|
// FileBackedMemRootList is the list of valid root directories values for annotations
|
||||||
FileBackedMemRootList []string
|
FileBackedMemRootList []string
|
||||||
@ -339,6 +343,9 @@ type HypervisorConfig struct {
|
|||||||
// PFlash image paths
|
// PFlash image paths
|
||||||
PFlash []string
|
PFlash []string
|
||||||
|
|
||||||
|
// VhostUserStorePathList is the list of valid values for vhost-user paths
|
||||||
|
VhostUserStorePathList []string
|
||||||
|
|
||||||
// customAssets is a map of assets.
|
// customAssets is a map of assets.
|
||||||
// Each value in that map takes precedence over the configured assets.
|
// Each value in that map takes precedence over the configured assets.
|
||||||
// For example, if there is a value for the "kernel" key in this map,
|
// For example, if there is a value for the "kernel" key in this map,
|
||||||
@ -401,9 +408,14 @@ type HypervisorConfig struct {
|
|||||||
// root bus instead of a bridge.
|
// root bus instead of a bridge.
|
||||||
HotplugVFIOOnRootBus bool
|
HotplugVFIOOnRootBus bool
|
||||||
|
|
||||||
// PCIeRootPort is used to indicate the number of PCIe Root Port devices
|
// GuestMemoryDumpPaging is used to indicate if enable paging
|
||||||
// The PCIe Root Port device is used to hot-plug the PCIe device
|
// for QEMU dump-guest-memory command
|
||||||
PCIeRootPort uint32
|
GuestMemoryDumpPaging bool
|
||||||
|
|
||||||
|
// Enable confidential guest support.
|
||||||
|
// Enable or disable different hardware features, ranging
|
||||||
|
// from memory encryption to both memory and CPU-state encryption and integrity.
|
||||||
|
ConfidentialGuest bool
|
||||||
|
|
||||||
// BootToBeTemplate used to indicate if the VM is created to be a template VM
|
// BootToBeTemplate used to indicate if the VM is created to be a template VM
|
||||||
BootToBeTemplate bool
|
BootToBeTemplate bool
|
||||||
@ -421,8 +433,8 @@ type HypervisorConfig struct {
|
|||||||
// related folders, sockets and device nodes should be.
|
// related folders, sockets and device nodes should be.
|
||||||
VhostUserStorePath string
|
VhostUserStorePath string
|
||||||
|
|
||||||
// VhostUserStorePathList is the list of valid values for vhost-user paths
|
// GuestCoredumpPath is the path in host for saving guest memory dump
|
||||||
VhostUserStorePathList []string
|
GuestMemoryDumpPath string
|
||||||
|
|
||||||
// GuestHookPath is the path within the VM that will be used for 'drop-in' hooks
|
// GuestHookPath is the path within the VM that will be used for 'drop-in' hooks
|
||||||
GuestHookPath string
|
GuestHookPath string
|
||||||
@ -434,30 +446,18 @@ type HypervisorConfig struct {
|
|||||||
// SELinux label for the VM
|
// SELinux label for the VM
|
||||||
SELinuxProcessLabel string
|
SELinuxProcessLabel string
|
||||||
|
|
||||||
|
// SGXEPCSize specifies the size in bytes for the EPC Section.
|
||||||
|
// Enable SGX. Hardware-based isolation and memory encryption.
|
||||||
|
SGXEPCSize int64
|
||||||
|
|
||||||
// RxRateLimiterMaxRate is used to control network I/O inbound bandwidth on VM level.
|
// RxRateLimiterMaxRate is used to control network I/O inbound bandwidth on VM level.
|
||||||
RxRateLimiterMaxRate uint64
|
RxRateLimiterMaxRate uint64
|
||||||
|
|
||||||
// TxRateLimiterMaxRate is used to control network I/O outbound bandwidth on VM level.
|
// TxRateLimiterMaxRate is used to control network I/O outbound bandwidth on VM level.
|
||||||
TxRateLimiterMaxRate uint64
|
TxRateLimiterMaxRate uint64
|
||||||
|
|
||||||
// SGXEPCSize specifies the size in bytes for the EPC Section.
|
// MemOffset specifies memory space for nvdimm device
|
||||||
// Enable SGX. Hardware-based isolation and memory encryption.
|
MemOffset uint64
|
||||||
SGXEPCSize int64
|
|
||||||
|
|
||||||
// Enable annotations by name
|
|
||||||
EnableAnnotations []string
|
|
||||||
|
|
||||||
// GuestCoredumpPath is the path in host for saving guest memory dump
|
|
||||||
GuestMemoryDumpPath string
|
|
||||||
|
|
||||||
// GuestMemoryDumpPaging is used to indicate if enable paging
|
|
||||||
// for QEMU dump-guest-memory command
|
|
||||||
GuestMemoryDumpPaging bool
|
|
||||||
|
|
||||||
// Enable confidential guest support.
|
|
||||||
// Enable or disable different hardware features, ranging
|
|
||||||
// from memory encryption to both memory and CPU-state encryption and integrity.
|
|
||||||
ConfidentialGuest bool
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// vcpu mapping from vcpu number to thread number
|
// vcpu mapping from vcpu number to thread number
|
||||||
|
@ -175,20 +175,20 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type qemuArchBase struct {
|
type qemuArchBase struct {
|
||||||
qemuMachine govmmQemu.Machine
|
|
||||||
qemuExePath string
|
|
||||||
memoryOffset uint64
|
memoryOffset uint64
|
||||||
|
networkIndex int
|
||||||
nestedRun bool
|
nestedRun bool
|
||||||
vhost bool
|
vhost bool
|
||||||
disableNvdimm bool
|
disableNvdimm bool
|
||||||
dax bool
|
dax bool
|
||||||
networkIndex int
|
protection guestProtection
|
||||||
|
qemuMachine govmmQemu.Machine
|
||||||
|
qemuExePath string
|
||||||
|
PFlash []string
|
||||||
kernelParamsNonDebug []Param
|
kernelParamsNonDebug []Param
|
||||||
kernelParamsDebug []Param
|
kernelParamsDebug []Param
|
||||||
kernelParams []Param
|
kernelParams []Param
|
||||||
Bridges []types.Bridge
|
Bridges []types.Bridge
|
||||||
PFlash []string
|
|
||||||
protection guestProtection
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
Loading…
Reference in New Issue
Block a user