Skip to content

Commit

Permalink
nemu-config: Add machine_type to config file
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
chavafg authored and Ganesh Maharaj Mahalingam committed Jun 4, 2019
1 parent 0caddf9 commit 92fcd4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ ifneq (,$(NEMUCMD))
# currently, huge pages are required for virtiofsd support
DEFENABLEHUGEPAGES_NEMU := true
# nemu uses virt machine type
DEFMACHINEACCELERATOR_NEMU := virt
DEFMACHINETYPE_NEMU := virt
DEFBLOCKSTORAGEDRIVER_NEMU := virtio-scsi
DEFNETWORKMODEL_NEMU := tcfilter
KERNELNAME = $(call MAKE_KERNEL_NAME,$(KERNELTYPE))
Expand Down Expand Up @@ -334,7 +334,7 @@ USER_VARS += KERNELTYPE_FC
USER_VARS += FIRMWAREPATH
USER_VARS += FIRMWAREPATH_NEMU
USER_VARS += MACHINEACCELERATORS
USER_VARS += DEFMACHINEACCELERATOR_NEMU
USER_VARS += DEFMACHINETYPE_NEMU
USER_VARS += KERNELPARAMS
USER_VARS += LIBEXECDIR
USER_VARS += LOCALSTATEDIR
Expand Down Expand Up @@ -486,7 +486,7 @@ $(GENERATED_FILES): %: %.in $(MAKEFILE_LIST) VERSION .git-commit
-e "s|@FIRMWAREPATH@|$(FIRMWAREPATH)|g" \
-e "s|@FIRMWAREPATH_NEMU@|$(FIRMWAREPATH_NEMU)|g" \
-e "s|@MACHINEACCELERATORS@|$(MACHINEACCELERATORS)|g" \
-e "s|@DEFMACHINEACCELERATOR_NEMU@|$(DEFMACHINEACCELERATOR_NEMU)|g" \
-e "s|@DEFMACHINETYPE_NEMU@|$(DEFMACHINETYPE_NEMU)|g" \
-e "s|@KERNELPARAMS@|$(KERNELPARAMS)|g" \
-e "s|@LOCALSTATEDIR@|$(LOCALSTATEDIR)|g" \
-e "s|@PKGLIBEXECDIR@|$(PKGLIBEXECDIR)|g" \
Expand Down
3 changes: 2 additions & 1 deletion cli/config/configuration-nemu.toml.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
path = "@NEMUPATH@"
kernel = "@KERNELPATH@"
image = "@IMAGEPATH@"
machine_type = "@DEFMACHINETYPE_NEMU@"

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

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

0 comments on commit 92fcd4d

Please sign in to comment.