Skip to contentSkip to conversation

Disable kqemu by default

PATCH In review Glauber Costa 5 participants 8 messages May 29, 2009 – May 30, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Disable kqemu by default

turns -no-kqemu option into -kqemu
set kqemu_allowed to 0 by default.

---
 kqemu.c         |    2 +-
 qemu-options.hx |    8 ++++----
 vl.c            |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
kqemu.c +1 -1
index 1718498..203241e 100644
@@ -81,7 +81,7 @@ int kqemu_fd = KQEMU_INVALID_FD;
    1 = user kqemu
    2 = kernel kqemu
 */
-int kqemu_allowed = 1;
+int kqemu_allowed = 0;
 uint64_t *pages_to_flush;
 unsigned int nb_pages_to_flush;
 uint64_t *ram_pages_to_update;
qemu-options.hx +4 -4
index 87af798..755dc13 100644
@@ -1329,12 +1329,12 @@ Enable KQEMU full virtualization (default is user mode only).
 ETEXI
 
 #ifdef CONFIG_KQEMU
-DEF("no-kqemu", 0, QEMU_OPTION_no_kqemu, \
-    "-no-kqemu       disable KQEMU kernel module usage\n")
+DEF("-kqemu", 0, QEMU_OPTION_kqemu, \
+    "-kqemu          enable KQEMU kernel module usage\n")
 #endif
 STEXI
-@item -no-kqemu
-Disable KQEMU kernel module usage. KQEMU options are only available if
+@item -kqemu
+Enable KQEMU kernel module usage. KQEMU options are only available if
 KQEMU support is enabled when compiling.
 ETEXI
 
vl.c +2 -2
index 1a227bb..13d87de 100644
@@ -5398,8 +5398,8 @@ int main(int argc, char **argv, char **envp)
                 break;
 #endif
 #ifdef CONFIG_KQEMU
-            case QEMU_OPTION_no_kqemu:
-                kqemu_allowed = 0;
+            case QEMU_OPTION_kqemu:
+                kqemu_allowed = 1;
                 break;
             case QEMU_OPTION_kernel_kqemu:
                 kqemu_allowed = 2;
Signature · 1 line
1.5.6.6
#1 lore raw
Quoted 2 lines · Glauber Costa

turns -no-kqemu option into -kqemu
set kqemu_allowed to 0 by default.

(...)

qemu-options.hx Enable KQEMU full virtualization (default is user mode only). · line 1333

Quoted 5 lines

#ifdef CONFIG_KQEMU

qemu-options.hx +2 -2
-DEF("no-kqemu", 0, QEMU_OPTION_no_kqemu, \
-    "-no-kqemu       disable KQEMU kernel module usage\n")
+DEF("-kqemu", 0, QEMU_OPTION_kqemu, \
+    "-kqemu          enable KQEMU kernel module usage\n")

Why is this change needed?

Even if changed, wouldn't it be better to leave the -no-kqemu option for compatibility reasons? Otherwise, current scripts may break.

Signature · 2 lines
Tomasz Chmielewski
http://wpkg.org
#2 lore raw
Quoted 6 lines · Tomasz Chmielewski
Quoted 2 lines · Glauber Costa

turns -no-kqemu option into -kqemu
set kqemu_allowed to 0 by default.

(...)

Quoted 7 lines

qemu-options.hx Enable KQEMU full virtualization (default is user mode only). · line 1333

Quoted 5 lines

#ifdef CONFIG_KQEMU

qemu-options.hx +2 -2
-DEF("no-kqemu", 0, QEMU_OPTION_no_kqemu, \
-    "-no-kqemu       disable KQEMU kernel module usage\n")
+DEF("-kqemu", 0, QEMU_OPTION_kqemu, \
+    "-kqemu          enable KQEMU kernel module usage\n")

Why is this change needed?

Well, we certainly need a -kqemu option to enable it, if it is disabled by default.

Quoted 3 lines

Even if changed, wouldn't it be better to leave the -no-kqemu option for compatibility reasons? Otherwise, current scripts may break.

options comes and go every day.

but it's not a big burden, we can leave the old option around...

#3 lore raw
Quoted 6 lines · Glauber Costa
Quoted 5 lines · Tomasz Chmielewski
Quoted 2 lines · Glauber Costa

turns -no-kqemu option into -kqemu
set kqemu_allowed to 0 by default.

(...)

Quoted 7 lines
Quoted 6 lines

qemu-options.hx Enable KQEMU full virtualization (default is user mode only). · line 1333

Quoted 5 lines

#ifdef CONFIG_KQEMU

qemu-options.hx +2 -2
-DEF("no-kqemu", 0, QEMU_OPTION_no_kqemu, \
-    "-no-kqemu       disable KQEMU kernel module usage\n")
+DEF("-kqemu", 0, QEMU_OPTION_kqemu, \
+    "-kqemu          enable KQEMU kernel module usage\n")

Why is this change needed?

Well, we certainly need a -kqemu option to enable it, if it is disabled by default.

I meant, why disable kqemu by default.

Signature · 2 lines
Tomasz Chmielewski
http://wpkg.org
#4 lore raw
Quoted 13 lines · Tomasz Chmielewski
Quoted 12 lines · Glauber Costa
Quoted 11 lines · Tomasz Chmielewski
Quoted 2 lines · Glauber Costa

turns -no-kqemu option into -kqemu
set kqemu_allowed to 0 by default.

(...)

qemu-options.hx Enable KQEMU full virtualization (default is user mode only). · line 1333

Quoted 5 lines

#ifdef CONFIG_KQEMU

qemu-options.hx +2 -2
-DEF("no-kqemu", 0, QEMU_OPTION_no_kqemu, \
-    "-no-kqemu       disable KQEMU kernel module usage\n")
+DEF("-kqemu", 0, QEMU_OPTION_kqemu, \
+    "-kqemu          enable KQEMU kernel module usage\n")

Why is this change needed?

Quoted 3 lines
Quoted 1 line

Well, we certainly need a -kqemu option to enable it, if it is disabled by default.

I meant, why disable kqemu by default.

see thread at http://lists.gnu.org/archive/html/qemu-devel/2009-05/msg01459.html

kqemu is unmaintainable.

#5 lore raw
Quoted 4 lines
Quoted 1 line

I meant, why disable kqemu by default.

see thread at http://lists.gnu.org/archive/html/qemu-devel/2009-05/msg01459.html

Quoted 1 line

kqemu is unmaintainable.

It's the only way to get accel on some platforms...
Though IIRC it has issues in BeOS (it uses DRx) and the port isn't in git anyway...

Quoted 5 lines

How about we add an option that's more future proof.

eg,

--accel qemu|kvm|kqemu|xen

+1

François.

#6 lore raw
In reply to Glauber Costa
Quoted 14 lines · Glauber Costa
Quoted 6 lines · Tomasz Chmielewski
Quoted 2 lines · Glauber Costa

turns -no-kqemu option into -kqemu
set kqemu_allowed to 0 by default.

(...)

Quoted 7 lines

qemu-options.hx Enable KQEMU full virtualization (default is user mode only). · line 1333

Quoted 5 lines

#ifdef CONFIG_KQEMU

qemu-options.hx +2 -2
-DEF("no-kqemu", 0, QEMU_OPTION_no_kqemu, \
-    "-no-kqemu       disable KQEMU kernel module usage\n")
+DEF("-kqemu", 0, QEMU_OPTION_kqemu, \
+    "-kqemu          enable KQEMU kernel module usage\n")

Why is this change needed?

Quoted 8 lines

Well, we certainly need a -kqemu option to enable it, if it is disabled by default.

Quoted 3 lines

Even if changed, wouldn't it be better to leave the -no-kqemu option for compatibility reasons? Otherwise, current scripts may break.

options comes and go every day.

but it's not a big burden, we can leave the old option around...

How about we add an option that's more future proof.

eg,

--accel qemu|kvm|kqemu|xen

if that isn't given, then it'd pick the 'best', use --accel XXX to override the auto behaviour

Daniel

Signature · 4 lines
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
#7 lore raw
In reply to Glauber Costa
Quoted 28 lines · Glauber Costa

turns -no-kqemu option into -kqemu
set kqemu_allowed to 0 by default.

---
 kqemu.c         |    2 +-
 qemu-options.hx |    8 ++++----
 vl.c            |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
kqemu.c +1 -1
index 1718498..203241e 100644
@@ -81,7 +81,7 @@ int kqemu_fd = KQEMU_INVALID_FD;
    1 = user kqemu
    2 = kernel kqemu
 */
-int kqemu_allowed = 1;
+int kqemu_allowed = 0;
 uint64_t *pages_to_flush;
 unsigned int nb_pages_to_flush;
 uint64_t *ram_pages_to_update;
qemu-options.hx +0 -0
index 87af798..755dc13 100644

qemu-options.hx Enable KQEMU full virtualization (default is user mode only). · line 1333

Quoted 7 lines
qemu-options.hx +2 -2
@@ -1329,12 +1329,12 @@ Enable KQEMU full virtualization (default is user mode only).
 ETEXI
 
 #ifdef CONFIG_KQEMU
-DEF("no-kqemu", 0, QEMU_OPTION_no_kqemu, \
-    "-no-kqemu       disable KQEMU kernel module usage\n")
+DEF("-kqemu", 0, QEMU_OPTION_kqemu, \
+    "-kqemu          enable KQEMU kernel module usage\n")

To be a bit consistent with -enable-kvm, what about -enable-kqemu?

Quoted 14 lines
qemu-options.hx +2 -2
 #endif
 STEXI
-@item -no-kqemu
-Disable KQEMU kernel module usage. KQEMU options are only available if
+@item -kqemu
+Enable KQEMU kernel module usage. KQEMU options are only available if
 KQEMU support is enabled when compiling.
 ETEXI
 
vl.c +0 -0
index 1a227bb..13d87de 100644

vl.c int main(int argc, char **argv, char **envp) · line 5405

Quoted 10 lines
vl.c +2 -2
@@ -5398,8 +5398,8 @@ int main(int argc, char **argv, char **envp)
                 break;
 #endif
 #ifdef CONFIG_KQEMU
-            case QEMU_OPTION_no_kqemu:
-                kqemu_allowed = 0;
+            case QEMU_OPTION_kqemu:
+                kqemu_allowed = 1;
                 break;
             case QEMU_OPTION_kernel_kqemu:
                 kqemu_allowed = 2;

Jan