[PATCH 1/2] qemu: Move -enable-kvm and friends earlier in the command line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/qemu/qemu_command.c                                | 18 +++++++++---------
 .../qemuxml2argv-cpu-host-kvmclock.args                |  2 +-
 tests/qemuxml2argvdata/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 05c12b2..dc611aa 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 78cf408..817f844 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 9de6f09..a76f2c2 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
-- 
1.8.2.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]