diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 05c12b2bdcc28c4320cbf99682ac9db7ae3fb8c3..dc611aaeb0dcc1045722e6f951cf044f5be3162b 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 78cf4081ee72524b6853a9d819d6ca7bd184408f..817f84439a5afeddd147bc58ae4bf0a780cd85d8 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 9de6f09b6a89be334184411dcb6dc938b02b3cf1..a76f2c2c053364bb8d7f31c94ee14bde543b8671 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