From cfe24c1a1867a223abc7cfe1cd94fc428b1280e0 Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Tue, 23 Apr 2013 16:15:22 +0200 Subject: [PATCH] qemu: Move -enable-kvm and friends earlier in the command line --- src/qemu/qemu_command.c | 18 +++++++++--------- .../qemuxml2argv-cpu-host-kvmclock.args | 2 +- .../qemuxml2argv-cpu-kvmclock.args | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 05c12b2bdc..dc611aaeb0 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5885,6 +5885,15 @@ qemuBuildCommandLine(virConnectPtr conn, if (qemuBuildMachineArgStr(cmd, def, qemuCaps) < 0) goto error; + if (disableKQEMU) + virCommandAddArg(cmd, "-no-kqemu"); + else if (enableKQEMU) + virCommandAddArgList(cmd, "-enable-kqemu", "-kernel-kqemu", NULL); + if (disableKVM) + virCommandAddArg(cmd, "-no-kvm"); + if (enableKVM) + virCommandAddArg(cmd, "-enable-kvm"); + if (qemuBuildCpuArgStr(driver, def, emulator, qemuCaps, hostarch, &cpu, &hasHwVirt, !!migrateFrom) < 0) goto error; @@ -5898,15 +5907,6 @@ qemuBuildCommandLine(virConnectPtr conn, virCommandAddArg(cmd, "-enable-nesting"); } - if (disableKQEMU) - virCommandAddArg(cmd, "-no-kqemu"); - else if (enableKQEMU) - virCommandAddArgList(cmd, "-enable-kqemu", "-kernel-kqemu", NULL); - if (disableKVM) - virCommandAddArg(cmd, "-no-kvm"); - if (enableKVM) - virCommandAddArg(cmd, "-enable-kvm"); - if (def->os.loader) { virCommandAddArg(cmd, "-bios"); virCommandAddArg(cmd, def->os.loader); diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-kvmclock.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-kvmclock.args index 78cf4081ee..817f84439a 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-kvmclock.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-kvmclock.args @@ -1,4 +1,4 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc \ --cpu host,-kvmclock -enable-kvm -m 214 -smp 6 \ +-enable-kvm -cpu host,-kvmclock -m 214 -smp 6 \ -nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot n -usb -net \ none -serial none -parallel none diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-kvmclock.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-kvmclock.args index 9de6f09b6a..a76f2c2c05 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-kvmclock.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-kvmclock.args @@ -1,4 +1,4 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc \ --cpu core2duo,-kvmclock -enable-kvm -m 214 -smp 6 \ +-enable-kvm -cpu core2duo,-kvmclock -m 214 -smp 6 \ -nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot n -usb -net \ none -serial none -parallel none -- GitLab