t-runner: make kvm accel. optional

This commit is contained in:
Tim Kourt 2016-05-17 16:52:40 -07:00 committed by Denis Kenzior
parent 63a4972672
commit 94b2c00534
1 changed files with 7 additions and 1 deletions

View File

@ -203,12 +203,12 @@ static void prepare_sandbox(void)
static char *const qemu_argv[] = {
"",
"-machine", "",
"-nodefaults",
"-nodefconfig",
"-no-user-config",
"-monitor", "none",
"-display", "none",
"-machine", "type=q35,accel=kvm:tcg",
"-m", "192M",
"-nographic",
"-vga", "none",
@ -289,6 +289,12 @@ static void start_qemu(void)
pos = (sizeof(qemu_argv) / sizeof(char *)) - 1;
argv[0] = (char *) qemu_binary;
if (has_virt)
argv[2] = "type=q35,accel=kvm:tcg";
else
argv[2] = "type=q35";
argv[pos++] = "-kernel";
argv[pos++] = (char *) kernel_image;
argv[pos++] = "-append";