mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-24 14:32:33 +00:00
clh: use common kernel params from the hypervisor code
The hypervisor code already defines 3 common kernel root params for the following cases: * NVDIMM * NVDIMM without DAX support * Virtio Block As parameters used for cloud-hypervisor have an overlap with the ones provided by the NVDIMM case, let's take advantage of that. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
4c164afbac
commit
dcdc412e25
@ -171,12 +171,9 @@ type cloudHypervisor struct {
|
||||
}
|
||||
|
||||
var clhKernelParams = []Param{
|
||||
{"root", "/dev/pmem0p1"},
|
||||
{"panic", "1"}, // upon kernel panic wait 1 second before reboot
|
||||
{"no_timer_check", ""}, // do not Check broken timer IRQ resources
|
||||
{"noreplace-smp", ""}, // do not replace SMP instructions
|
||||
{"rootflags", "dax,data=ordered,errors=remount-ro ro"}, // mount the root filesystem as readonly
|
||||
{"rootfstype", "ext4"},
|
||||
}
|
||||
|
||||
var clhDebugKernelParams = []Param{
|
||||
@ -267,7 +264,8 @@ func (clh *cloudHypervisor) CreateVM(ctx context.Context, id string, network Net
|
||||
clh.vmconfig.Cpus = chclient.NewCpusConfig(int32(clh.config.NumVCPUs), int32(clh.config.DefaultMaxVCPUs))
|
||||
|
||||
// First take the default parameters defined by this driver
|
||||
params := clhKernelParams
|
||||
params := commonNvdimmKernelRootParams
|
||||
params = append(params, clhKernelParams...)
|
||||
|
||||
// Followed by extra debug parameters if debug enabled in configuration file
|
||||
if clh.config.Debug {
|
||||
|
Loading…
Reference in New Issue
Block a user