Skip to content

Commit a268c66

Browse files
chavafgGanesh Maharaj Mahalingam
authored andcommitted
nemu-config: Add machine_type to config file
nemu needs to be configured with: `machine_type = "virt"` by default. In addition, this commit removes `machine_accelerators="virt"` which was added instead of `machine_type` in a previous commit. Fixes: kata-containers#1707. Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com> (cherry picked from commit 6be5e5f) Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
1 parent 97cf3c9 commit a268c66

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ ifneq (,$(NEMUCMD))
245245
# currently, huge pages are required for virtiofsd support
246246
DEFENABLEHUGEPAGES_NEMU := true
247247
# nemu uses virt machine type
248-
DEFMACHINEACCELERATOR_NEMU := virt
248+
DEFMACHINETYPE_NEMU := virt
249249
DEFBLOCKSTORAGEDRIVER_NEMU := virtio-scsi
250250
DEFNETWORKMODEL_NEMU := tcfilter
251251
KERNELNAME = $(call MAKE_KERNEL_NAME,$(KERNELTYPE))
@@ -334,7 +334,7 @@ USER_VARS += KERNELTYPE_FC
334334
USER_VARS += FIRMWAREPATH
335335
USER_VARS += FIRMWAREPATH_NEMU
336336
USER_VARS += MACHINEACCELERATORS
337-
USER_VARS += DEFMACHINEACCELERATOR_NEMU
337+
USER_VARS += DEFMACHINETYPE_NEMU
338338
USER_VARS += KERNELPARAMS
339339
USER_VARS += LIBEXECDIR
340340
USER_VARS += LOCALSTATEDIR
@@ -486,7 +486,7 @@ $(GENERATED_FILES): %: %.in $(MAKEFILE_LIST) VERSION .git-commit
486486
-e "s|@FIRMWAREPATH@|$(FIRMWAREPATH)|g" \
487487
-e "s|@FIRMWAREPATH_NEMU@|$(FIRMWAREPATH_NEMU)|g" \
488488
-e "s|@MACHINEACCELERATORS@|$(MACHINEACCELERATORS)|g" \
489-
-e "s|@DEFMACHINEACCELERATOR_NEMU@|$(DEFMACHINEACCELERATOR_NEMU)|g" \
489+
-e "s|@DEFMACHINETYPE_NEMU@|$(DEFMACHINETYPE_NEMU)|g" \
490490
-e "s|@KERNELPARAMS@|$(KERNELPARAMS)|g" \
491491
-e "s|@LOCALSTATEDIR@|$(LOCALSTATEDIR)|g" \
492492
-e "s|@PKGLIBEXECDIR@|$(PKGLIBEXECDIR)|g" \

cli/config/configuration-nemu.toml.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
path = "@NEMUPATH@"
1616
kernel = "@KERNELPATH@"
1717
image = "@IMAGEPATH@"
18+
machine_type = "@DEFMACHINETYPE_NEMU@"
1819

1920
# Optional space-separated list of options to pass to the guest kernel.
2021
# For example, use `kernel_params = "vsyscall=emulate"` if you are having
@@ -35,7 +36,7 @@ firmware = "@FIRMWAREPATH_NEMU@"
3536
# Machine accelerators
3637
# comma-separated list of machine accelerators to pass to the hypervisor.
3738
# For example, `machine_accelerators = "nosmm,nosmbus,nosata,nopit,static-prt,nofw"`
38-
machine_accelerators="@DEFMACHINEACCELERATOR_NEMU@"
39+
machine_accelerators=""
3940

4041
# Default number of vCPUs per SB/VM:
4142
# unspecified or 0 --> will be set to @DEFVCPUS@

0 commit comments

Comments
 (0)