Re: kqemu cleaning
Thanks Stuart. -- best regards q#
Re: kqemu cleaning
Hi! On Sun, Jan 20, 2008 at 02:43:59PM +0100, Tobias Ulmer wrote: (i havn't really tested this, but can't we drop the standard qemu and make qemu-kqemu the default? In my [admitedly short] testing, this works fine and just prints a message that it can't load kqemu) Seems people reported problems with kqemu, so I'm not in favor of dropping the non-kqemu variant. Kind regards, Hannah.
Re: kqemu cleaning
On Mon, 21 Jan 2008, Hannah Schroeter wrote: Seems people reported problems with kqemu, so I'm not in favor of dropping the non-kqemu variant. The point is that qemu should work fine with or without kqemu with no need of a FLAVOR. Even if compiled with support for kqemu, qemu will proceed in software mode is the kernel module is not loaded. If this works fine like that, then the non-kqemu variant should be dropped. -- Antoine
Re: kqemu cleaning
On Mon, Jan 21, 2008 at 12:31:10PM +0100, Hannah Schroeter wrote: Hi! On Sun, Jan 20, 2008 at 02:43:59PM +0100, Tobias Ulmer wrote: (i havn't really tested this, but can't we drop the standard qemu and make qemu-kqemu the default? In my [admitedly short] testing, this works fine and just prints a message that it can't load kqemu) Seems people reported problems with kqemu, so I'm not in favor of dropping the non-kqemu variant. Kind regards, Hannah. qemu-kqemu does not imply the use of kqemu, it just enables the possibility to use the kernel module. So far I've not heard of problems using qemu-kqemu _without_ kqemu. Ubuntu and i suspect therefore Debian do enable support for kqemu in qemu, but do not install the kernel module by default. Tobias
Re: kqemu cleaning
Hi! On Mon, Jan 21, 2008 at 12:41:29PM +0100, Antoine Jacoutot wrote: On Mon, 21 Jan 2008, Hannah Schroeter wrote: Seems people reported problems with kqemu, so I'm not in favor of dropping the non-kqemu variant. The point is that qemu should work fine with or without kqemu with no need of a FLAVOR. Even if compiled with support for kqemu, qemu will proceed in software mode is the kernel module is not loaded. If this works fine like that, then the non-kqemu variant should be dropped. Can one, then, also disable kqemu in the kqemu variant of qemu even when the kqemu kernel module is loaded, e.g. with a command line option? E.g. if I'm a non-root user on a box and I've noticed that there's subtle behavior difference that is bad for me? Kind regards, Hannah.
Re: kqemu cleaning
Hi! On Mon, Jan 21, 2008 at 02:40:20PM +0100, Stefan Sperling wrote: [...] Can one, then, also disable kqemu in the kqemu variant of qemu even when the kqemu kernel module is loaded, e.g. with a command line option? Yes. Quoting http://fabrice.bellard.free.fr/qemu/kqemu-doc.html : [...] Thanks. Kind regards, Hannah.
Re: kqemu cleaning
On Mon, Jan 21, 2008 at 02:22:47PM +0100, Hannah Schroeter wrote: Hi! On Mon, Jan 21, 2008 at 12:41:29PM +0100, Antoine Jacoutot wrote: On Mon, 21 Jan 2008, Hannah Schroeter wrote: Seems people reported problems with kqemu, so I'm not in favor of dropping the non-kqemu variant. The point is that qemu should work fine with or without kqemu with no need of a FLAVOR. Even if compiled with support for kqemu, qemu will proceed in software mode is the kernel module is not loaded. If this works fine like that, then the non-kqemu variant should be dropped. Can one, then, also disable kqemu in the kqemu variant of qemu even when the kqemu kernel module is loaded, e.g. with a command line option? Yes. Quoting http://fabrice.bellard.free.fr/qemu/kqemu-doc.html : When QEMU is compiled with KQEMU support, the following option is added to QEMU: `-no-kqemu' Disable the usage of the QEMU Accelerator module (KQEMU). QEMU will work as usual but will be slower. This option can be useful to determine if emulation problems are coming from KQEMU. -- stefan http://stsp.name PGP Key: 0xF59D25F0 pgpEqLq2pPX5k.pgp Description: PGP signature
Re: kqemu cleaning
Tobias Ulmer a écrit : On Mon, Jan 21, 2008 at 12:31:10PM +0100, Hannah Schroeter wrote: Hi! On Sun, Jan 20, 2008 at 02:43:59PM +0100, Tobias Ulmer wrote: (i havn't really tested this, but can't we drop the standard qemu and make qemu-kqemu the default? In my [admitedly short] testing, this works fine and just prints a message that it can't load kqemu) Seems people reported problems with kqemu, so I'm not in favor of dropping the non-kqemu variant. Kind regards, Hannah. qemu-kqemu does not imply the use of kqemu, it just enables the possibility to use the kernel module. So far I've not heard of problems using qemu-kqemu _without_ kqemu. Ubuntu and i suspect therefore Debian do enable support for kqemu in qemu, but do not install the kernel module by default. Tobias I can confirm, there are no problem if kernel-kqemu is not enable. My conclusions about qemu-kqemu, the are 3 options : - Default, no option : User acceleration (qemu compile with kqemu) - no-kqemu : Disable all acceleration - kernel-kqemu : Enable kernel acceleration Try to run qemu with differents options and then type ctrl+alt+2 for monitor console and info kqemu. Correct me if I'am wrong.
Re: kqemu cleaning
On Mon, Jan 21, 2008 at 10:32:55PM +0100, DbD wrote: I can confirm, there are no problem if kernel-kqemu is not enable. My conclusions about qemu-kqemu, the are 3 options : - Default, no option : User acceleration (qemu compile with kqemu) - no-kqemu : Disable all acceleration - kernel-kqemu : Enable kernel acceleration Try to run qemu with differents options and then type ctrl+alt+2 for monitor console and info kqemu. Ok. Could someone explain me what is the difference between user and kernel acceleration. Is kqemu.o module needed for both of them? When qemu needs hardware accelleration (VMX|SVM), or does it need at all? I went thourgh kqemu-doc.html but still don't understand this. Thanks in advance. References 1. http://fabrice.bellard.free.fr/qemu/kqemu-doc.html -- best regards q#
Re: kqemu cleaning
On 2008/01/22 00:50, Mikolaj Kucharski wrote: On Mon, Jan 21, 2008 at 10:32:55PM +0100, DbD wrote: I can confirm, there are no problem if kernel-kqemu is not enable. My conclusions about qemu-kqemu, the are 3 options : - Default, no option : User acceleration (qemu compile with kqemu) - no-kqemu : Disable all acceleration - kernel-kqemu : Enable kernel acceleration Try to run qemu with differents options and then type ctrl+alt+2 for monitor console and info kqemu. Ok. Could someone explain me what is the difference between user and kernel acceleration. User - userland of the guest OS is run by kqemu, but the kernel is run by the normal qemu method of dynamic translation (the method used for both kernel+user code when kqemu is not loaded). Kernel - both userland and kernel of the guest OS are run by kqemu. This makes some assumptions which aren't true for all guest OS (i.e. it doesn't work with everything). Is kqemu.o module needed for both of them? Yes. When qemu needs hardware accelleration (VMX|SVM), or does it need at all? KQEMU does not currently use the hardware virtualization features of newer x86 CPUs. http://fabrice.bellard.free.fr/qemu/kqemu-tech.html (this is the technical documentation, whoever wants to know about the internals should read this).
Re: kqemu cleaning
Suppose you compiled qemu with kqemu flavor if kqemu is loaded : 1) no kqemu at all : $ qemu -no-kqemu 2) qemu with kqemu in user mode : (in this mode OpenBSD and NetBSD guests will work, thanks to Adrian's patch to kqemu : patches/patch-common_monitor_c) $ qemu 3) qemu with kqemu in kernel mode : (in this mode OpenBSD and NetBSD guests wont work) $ qemu -kernel-kqemu if kqemu is not loaded : which ever command line you type, it will run without kqemu ( 2) 3) will complain but run without kqemu) btw, an ultra-mini benchmark, I gziped the same file and mesured the time it took: 770 seconds OpenBSD host XP guest without kqemu 132 seconds OpenBSD host XP guest with user kqemu 115 seconds OpenBSD host XP guest with kernel kqemu 80 seconds XP native On Mon, Jan 21, 2008 at 02:22:47PM +0100, Hannah Schroeter wrote: Hi! On Mon, Jan 21, 2008 at 12:41:29PM +0100, Antoine Jacoutot wrote: On Mon, 21 Jan 2008, Hannah Schroeter wrote: Seems people reported problems with kqemu, so I'm not in favor of dropping the non-kqemu variant. The point is that qemu should work fine with or without kqemu with no need of a FLAVOR. Even if compiled with support for kqemu, qemu will proceed in software mode is the kernel module is not loaded. If this works fine like that, then the non-kqemu variant should be dropped. Can one, then, also disable kqemu in the kqemu variant of qemu even when the kqemu kernel module is loaded, e.g. with a command line option? E.g. if I'm a non-root user on a box and I've noticed that there's subtle behavior difference that is bad for me? Kind regards, Hannah.
kqemu cleaning
Hi. This diff does some cleaning and add missing stuffs to the newly imported kqemu port. - add missing RCS tags - respect $CC - add NO_REGRESS - s/$LOCALBASE/$PREFIX - lowercase email - hook to the build - add _kqemu user to infrastructure/db/user.list Comments/OK? -- AntoineIndex: user.list === RCS file: /cvs/ports/infrastructure/db/user.list,v retrieving revision 1.82 diff -u -r1.82 user.list --- user.list 21 Nov 2007 18:44:34 - 1.82 +++ user.list 20 Jan 2008 10:16:52 - @@ -105,3 +105,4 @@ 594 _ejabberd _ejabberd net/ejabberd 595 _poppassd _poppassd sysutils/openpoppassd 596 _heartbeat _heartbeat sysutils/heartbeat +597_kqemu emulators/kqemu Index: Makefile === RCS file: /cvs/ports/emulators/Makefile,v retrieving revision 1.41 diff -u -r1.41 Makefile --- Makefile18 Jan 2008 14:42:33 - 1.41 +++ Makefile20 Jan 2008 10:18:14 - @@ -16,6 +16,7 @@ SUBDIR += gns3 SUBDIR += gxemul SUBDIR += ines +SUBDIR += kqemu SUBDIR += mastergear SUBDIR += qemu SUBDIR += redhat Index: Makefile === RCS file: /cvs/ports/emulators/kqemu/Makefile,v retrieving revision 1.2 diff -u -r1.2 Makefile --- Makefile20 Jan 2008 00:13:21 - 1.2 +++ Makefile20 Jan 2008 10:40:51 - @@ -1,13 +1,16 @@ +# $OpenBSD$ + ONLY_FOR_ARCHS=i386 amd64 COMMENT= QEMU accelerator module DISTNAME= kqemu-1.3.0pre11 +PKGNAME= ${DISTNAME}p0 CATEGORIES=emulators HOMEPAGE= http://fabrice.bellard.free.fr/qemu/ -MAINTAINER=Todd T. Fries [EMAIL PROTECTED] +MAINTAINER=Todd T. Fries [EMAIL PROTECTED] # GPL PERMIT_PACKAGE_CDROM= Yes @@ -20,8 +23,15 @@ BUILD_DEPENDS= ::devel/gmake CONFIGURE_STYLE= gnu +CONFIGURE_ARGS=--cc=${CC} \ + --host-cc=${CC} \ + --make=${MAKE_PROGRAM} + MAKE_FILE= Makefile.openbsd -PREFIX=${LOCALBASE}/lib/kqemu +INSTDIR= ${PREFIX}/lib/kqemu +SUBST_VARS=INSTDIR + +NO_REGRESS=Yes FILES= Makefile.openbsd kqemu-openbsd.c @@ -31,7 +41,7 @@ .endfor do-install: - ${INSTALL_DATA_DIR} ${PREFIX} - ${INSTALL_DATA} ${WRKBUILD}/kqemu.o ${PREFIX} + ${INSTALL_DATA_DIR} ${INSTDIR} + ${INSTALL_DATA} ${WRKBUILD}/kqemu.o ${INSTDIR} .include bsd.port.mk Index: files/Makefile.openbsd === RCS file: /cvs/ports/emulators/kqemu/files/Makefile.openbsd,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 Makefile.openbsd --- files/Makefile.openbsd 19 Jan 2008 23:55:19 - 1.1.1.1 +++ files/Makefile.openbsd 20 Jan 2008 10:40:51 - @@ -1,3 +1,5 @@ +# $OpenBSD + NOMAN = noman .if ${MACHINE_ARCH} == i386 Index: pkg/MESSAGE === RCS file: /cvs/ports/emulators/kqemu/pkg/MESSAGE,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 MESSAGE --- pkg/MESSAGE 19 Jan 2008 23:55:19 - 1.1.1.1 +++ pkg/MESSAGE 20 Jan 2008 10:40:51 - @@ -1,8 +1,8 @@ If you want to load this kernel module at boot time, add the following lines to /etc/rc.securelevel : -if [ -r /usr/local/lib/kqemu/kqemu.o ]; then - echo ' kqemu'; /sbin/modload /usr/local/lib/kqemu/kqemu.o +if [ -r ${INSTDIR}/kqemu.o ]; then + echo ' kqemu'; /sbin/modload ${INSTDIR}/kqemu.o fi If you want a user to be able to use this module, add them to the group Index: pkg/PLIST === RCS file: /cvs/ports/emulators/kqemu/pkg/PLIST,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 PLIST --- pkg/PLIST 19 Jan 2008 23:55:19 - 1.1.1.1 +++ pkg/PLIST 20 Jan 2008 10:40:51 - @@ -1,3 +1,4 @@ @comment $OpenBSD: PLIST,v 1.1.1.1 2008/01/19 23:55:19 todd Exp $ @newgroup _kqemu:597 -kqemu.o +lib/kqemu/ +lib/kqemu/kqemu.o
Re: kqemu cleaning
On Sun, Jan 20, 2008 at 11:42:13AM +0100, Antoine Jacoutot wrote: Hi. This diff does some cleaning and add missing stuffs to the newly imported kqemu port. - add missing RCS tags - respect $CC - add NO_REGRESS - s/$LOCALBASE/$PREFIX - lowercase email - hook to the build - add _kqemu user to infrastructure/db/user.list Comments/OK? Could qemu with enabled kqemu flavor depend on this port? -- best regards q#
Re: kqemu cleaning
Yes minus the hooking to the build yet. We need more test results for amd64. On Sun, Jan 20, 2008 at 11:42:13AM +0100, Antoine Jacoutot wrote: Hi. This diff does some cleaning and add missing stuffs to the newly imported kqemu port. - add missing RCS tags - respect $CC - add NO_REGRESS - s/$LOCALBASE/$PREFIX - lowercase email - hook to the build - add _kqemu user to infrastructure/db/user.list Comments/OK? -- Antoine Index: user.list === RCS file: /cvs/ports/infrastructure/db/user.list,v retrieving revision 1.82 diff -u -r1.82 user.list --- user.list 21 Nov 2007 18:44:34 - 1.82 +++ user.list 20 Jan 2008 10:16:52 - @@ -105,3 +105,4 @@ 594 _ejabberd_ejabberd net/ejabberd 595 _poppassd_poppassd sysutils/openpoppassd 596 _heartbeat _heartbeat sysutils/heartbeat +597 _kqemu emulators/kqemu Index: Makefile === RCS file: /cvs/ports/emulators/Makefile,v retrieving revision 1.41 diff -u -r1.41 Makefile --- Makefile 18 Jan 2008 14:42:33 - 1.41 +++ Makefile 20 Jan 2008 10:18:14 - @@ -16,6 +16,7 @@ SUBDIR += gns3 SUBDIR += gxemul SUBDIR += ines +SUBDIR += kqemu SUBDIR += mastergear SUBDIR += qemu SUBDIR += redhat Index: Makefile === RCS file: /cvs/ports/emulators/kqemu/Makefile,v retrieving revision 1.2 diff -u -r1.2 Makefile --- Makefile 20 Jan 2008 00:13:21 - 1.2 +++ Makefile 20 Jan 2008 10:40:51 - @@ -1,13 +1,16 @@ +# $OpenBSD$ + ONLY_FOR_ARCHS= i386 amd64 COMMENT= QEMU accelerator module DISTNAME=kqemu-1.3.0pre11 +PKGNAME= ${DISTNAME}p0 CATEGORIES= emulators HOMEPAGE=http://fabrice.bellard.free.fr/qemu/ -MAINTAINER= Todd T. Fries [EMAIL PROTECTED] +MAINTAINER= Todd T. Fries [EMAIL PROTECTED] # GPL PERMIT_PACKAGE_CDROM=Yes @@ -20,8 +23,15 @@ BUILD_DEPENDS= ::devel/gmake CONFIGURE_STYLE= gnu +CONFIGURE_ARGS= --cc=${CC} \ + --host-cc=${CC} \ + --make=${MAKE_PROGRAM} + MAKE_FILE= Makefile.openbsd -PREFIX= ${LOCALBASE}/lib/kqemu +INSTDIR= ${PREFIX}/lib/kqemu +SUBST_VARS= INSTDIR + +NO_REGRESS= Yes FILES= Makefile.openbsd kqemu-openbsd.c @@ -31,7 +41,7 @@ .endfor do-install: - ${INSTALL_DATA_DIR} ${PREFIX} - ${INSTALL_DATA} ${WRKBUILD}/kqemu.o ${PREFIX} + ${INSTALL_DATA_DIR} ${INSTDIR} + ${INSTALL_DATA} ${WRKBUILD}/kqemu.o ${INSTDIR} .include bsd.port.mk Index: files/Makefile.openbsd === RCS file: /cvs/ports/emulators/kqemu/files/Makefile.openbsd,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 Makefile.openbsd --- files/Makefile.openbsd19 Jan 2008 23:55:19 - 1.1.1.1 +++ files/Makefile.openbsd20 Jan 2008 10:40:51 - @@ -1,3 +1,5 @@ +# $OpenBSD + NOMAN = noman .if ${MACHINE_ARCH} == i386 Index: pkg/MESSAGE === RCS file: /cvs/ports/emulators/kqemu/pkg/MESSAGE,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 MESSAGE --- pkg/MESSAGE 19 Jan 2008 23:55:19 - 1.1.1.1 +++ pkg/MESSAGE 20 Jan 2008 10:40:51 - @@ -1,8 +1,8 @@ If you want to load this kernel module at boot time, add the following lines to /etc/rc.securelevel : -if [ -r /usr/local/lib/kqemu/kqemu.o ]; then - echo ' kqemu'; /sbin/modload /usr/local/lib/kqemu/kqemu.o +if [ -r ${INSTDIR}/kqemu.o ]; then + echo ' kqemu'; /sbin/modload ${INSTDIR}/kqemu.o fi If you want a user to be able to use this module, add them to the group Index: pkg/PLIST === RCS file: /cvs/ports/emulators/kqemu/pkg/PLIST,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 PLIST --- pkg/PLIST 19 Jan 2008 23:55:19 - 1.1.1.1 +++ pkg/PLIST 20 Jan 2008 10:40:51 - @@ -1,3 +1,4 @@ @comment $OpenBSD: PLIST,v 1.1.1.1 2008/01/19 23:55:19 todd Exp $ @newgroup _kqemu:597 -kqemu.o +lib/kqemu/ +lib/kqemu/kqemu.o
Re: kqemu cleaning
On Sun, Jan 20, 2008 at 11:42:13AM +0100, Antoine Jacoutot wrote: Hi. This diff does some cleaning and add missing stuffs to the newly imported kqemu port. - add missing RCS tags - respect $CC - add NO_REGRESS - s/$LOCALBASE/$PREFIX - lowercase email - hook to the build - add _kqemu user to infrastructure/db/user.list Comments/OK? Looks good; ligthly tested with dragonfly; works for me(TM). kqemu could RUN_DEPENDS on qemu-kqemu because it's not very useful by itself.. (i havn't really tested this, but can't we drop the standard qemu and make qemu-kqemu the default? In my [admitedly short] testing, this works fine and just prints a message that it can't load kqemu) Tobias
Re: kqemu cleaning
On Sun, 20 Jan 2008, Tobias Ulmer wrote: (i havn't really tested this, but can't we drop the standard qemu and make qemu-kqemu the default? In my [admitedly short] testing, this works fine and just prints a message that it can't load kqemu) If that doesn't introduce any bad side effects, I'm all in favor for doing this too. We should wait for todd's input. -- Antoine
Re: kqemu cleaning
I was cautious in how I enabled this for now. It does change the codepath. I'd like to give the wider audience of ports testers the benefit of giving feedback on this. In the absence of any issues running qemu w/out kqemu, I'll consider it in a few weeks. Thanks, On Sunday 20 January 2008 07:43:59 Tobias Ulmer wrote: On Sun, Jan 20, 2008 at 11:42:13AM +0100, Antoine Jacoutot wrote: Hi. This diff does some cleaning and add missing stuffs to the newly imported kqemu port. - add missing RCS tags - respect $CC - add NO_REGRESS - s/$LOCALBASE/$PREFIX - lowercase email - hook to the build - add _kqemu user to infrastructure/db/user.list Comments/OK? Looks good; ligthly tested with dragonfly; works for me(TM). kqemu could RUN_DEPENDS on qemu-kqemu because it's not very useful by itself.. (i havn't really tested this, but can't we drop the standard qemu and make qemu-kqemu the default? In my [admitedly short] testing, this works fine and just prints a message that it can't load kqemu) Tobias -- Todd Fries .. [EMAIL PROTECTED] _ | \ 1.636.410.0632 (voice) | Free Daemon Consulting \ 1.405.227.9094 (voice) | http://FreeDaemonConsulting.com \ 1.866.792.3418 (FAX) | ..in support of free software solutions. \ 250797 (FWD) | \ \\ 37E7 D3EB 74D0 8D66 A68D B866 0326 204E 3F42 004A http://todd.fries.net/pgp.txt
Re: kqemu cleaning
Ok. On Sunday 20 January 2008 04:42:13 Antoine Jacoutot wrote: Hi. This diff does some cleaning and add missing stuffs to the newly imported kqemu port. - add missing RCS tags - respect $CC - add NO_REGRESS - s/$LOCALBASE/$PREFIX - lowercase email - hook to the build - add _kqemu user to infrastructure/db/user.list Comments/OK? -- Todd Fries .. [EMAIL PROTECTED] _ | \ 1.636.410.0632 (voice) | Free Daemon Consulting \ 1.405.227.9094 (voice) | http://FreeDaemonConsulting.com \ 1.866.792.3418 (FAX) | ..in support of free software solutions. \ 250797 (FWD) | \ \\ 37E7 D3EB 74D0 8D66 A68D B866 0326 204E 3F42 004A http://todd.fries.net/pgp.txt