3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 17:59:25 +01:00

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

View File

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