mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-13 21:09:31 +00:00
Merge pull request #1660 from Pennyzct/rootfs_ro
kernelRootParams: define agnostic commonkernelRootParams
This commit is contained in:
@@ -54,11 +54,8 @@ const (
|
|||||||
fcDiskPoolSize = 8
|
fcDiskPoolSize = 8
|
||||||
)
|
)
|
||||||
|
|
||||||
var fcKernelParams = []Param{
|
var fcKernelParams = append(commonVirtioblkKernelRootParams, []Param{
|
||||||
// The boot source is the first partition of the first block device added
|
// The boot source is the first partition of the first block device added
|
||||||
{"root", "/dev/vda1"},
|
|
||||||
{"rootflags", "data=ordered,errors=remount-ro ro"},
|
|
||||||
{"rootfstype", "ext4"},
|
|
||||||
{"pci", "off"},
|
{"pci", "off"},
|
||||||
{"reboot", "k"},
|
{"reboot", "k"},
|
||||||
{"panic", "1"},
|
{"panic", "1"},
|
||||||
@@ -70,7 +67,7 @@ var fcKernelParams = []Param{
|
|||||||
// Firecracker doesn't support ACPI
|
// Firecracker doesn't support ACPI
|
||||||
// Fix kernel error "ACPI BIOS Error (bug)"
|
// Fix kernel error "ACPI BIOS Error (bug)"
|
||||||
{"acpi", "off"},
|
{"acpi", "off"},
|
||||||
}
|
}...)
|
||||||
|
|
||||||
func (s vmmState) String() string {
|
func (s vmmState) String() string {
|
||||||
switch s {
|
switch s {
|
||||||
|
@@ -53,6 +53,20 @@ const (
|
|||||||
// In some architectures the maximum number of vCPUs depends on the number of physical cores.
|
// In some architectures the maximum number of vCPUs depends on the number of physical cores.
|
||||||
var defaultMaxQemuVCPUs = MaxQemuVCPUs()
|
var defaultMaxQemuVCPUs = MaxQemuVCPUs()
|
||||||
|
|
||||||
|
// agnostic list of kernel root parameters for NVDIMM
|
||||||
|
var commonNvdimmKernelRootParams = []Param{ //nolint: unused, deadcode, varcheck
|
||||||
|
{"root", "/dev/pmem0p1"},
|
||||||
|
{"rootflags", "dax,data=ordered,errors=remount-ro ro"},
|
||||||
|
{"rootfstype", "ext4"},
|
||||||
|
}
|
||||||
|
|
||||||
|
// agnostic list of kernel root parameters for virtio-blk
|
||||||
|
var commonVirtioblkKernelRootParams = []Param{ //nolint: unused, deadcode, varcheck
|
||||||
|
{"root", "/dev/vda1"},
|
||||||
|
{"rootflags", "data=ordered,errors=remount-ro ro"},
|
||||||
|
{"rootfstype", "ext4"},
|
||||||
|
}
|
||||||
|
|
||||||
// deviceType describes a virtualized device type.
|
// deviceType describes a virtualized device type.
|
||||||
type deviceType int
|
type deviceType int
|
||||||
|
|
||||||
|
@@ -37,11 +37,7 @@ var qemuPaths = map[string]string{
|
|||||||
QemuQ35: defaultQemuPath,
|
QemuQ35: defaultQemuPath,
|
||||||
}
|
}
|
||||||
|
|
||||||
var kernelRootParams = []Param{
|
var kernelRootParams = commonNvdimmKernelRootParams
|
||||||
{"root", "/dev/pmem0p1"},
|
|
||||||
{"rootflags", "dax,data=ordered,errors=remount-ro ro"},
|
|
||||||
{"rootfstype", "ext4"},
|
|
||||||
}
|
|
||||||
|
|
||||||
var kernelParams = []Param{
|
var kernelParams = []Param{
|
||||||
{"tsc", "reliable"},
|
{"tsc", "reliable"},
|
||||||
|
@@ -43,9 +43,12 @@ var kernelParams = []Param{
|
|||||||
{"iommu.passthrough", "0"},
|
{"iommu.passthrough", "0"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For now, AArch64 doesn't support DAX, so we couldn't use
|
||||||
|
// commonNvdimmKernelRootParams, the agnostic list of kernel
|
||||||
|
// root parameters for NVDIMM
|
||||||
var kernelRootParams = []Param{
|
var kernelRootParams = []Param{
|
||||||
{"root", "/dev/pmem0p1"},
|
{"root", "/dev/pmem0p1"},
|
||||||
{"rootflags", "data=ordered,errors=remount-ro rw"},
|
{"rootflags", "data=ordered,errors=remount-ro ro"},
|
||||||
{"rootfstype", "ext4"},
|
{"rootfstype", "ext4"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -39,9 +39,7 @@ var kernelParams = []Param{
|
|||||||
{"console", "ttysclp0"},
|
{"console", "ttysclp0"},
|
||||||
}
|
}
|
||||||
|
|
||||||
var kernelRootParams = []Param{
|
var kernelRootParams = commonVirtioblkKernelRootParams
|
||||||
{"root", "/dev/vda1"},
|
|
||||||
}
|
|
||||||
|
|
||||||
var supportedQemuMachines = []govmmQemu.Machine{
|
var supportedQemuMachines = []govmmQemu.Machine{
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user