qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Supported OS: FreeBSD 5.3-RELEASE
@ 2005-07-25  6:43 marm.mm
  2005-07-25  8:30 ` Natalia Portillo
  2005-07-25 16:21 ` Bakul Shah
  0 siblings, 2 replies; 6+ messages in thread
From: marm.mm @ 2005-07-25  6:43 UTC (permalink / raw)
  To: qemu-devel

Hello,

For a couple of days ago, i have successfully tested FreeBSD (just the
kernel boot). The kernel boots (from cd), and when I choosed the
packages to install, the installer, makes the slices (bsdlabels ...). I
aborted the installation, because I had no more time to do more ... The
OS seems to work, but I dont have tested network features, sound or the
XServer. The Version of QEMU is 0.7.0, not the actual CVS. I have
patched the version to run on freebsd (lrintf, llrintf ..., I dont have
used the patch from ports, because I dont know). 

marm

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] Supported OS: FreeBSD 5.3-RELEASE
  2005-07-25  6:43 [Qemu-devel] Supported OS: FreeBSD 5.3-RELEASE marm.mm
@ 2005-07-25  8:30 ` Natalia Portillo
  2005-07-25 16:21 ` Bakul Shah
  1 sibling, 0 replies; 6+ messages in thread
From: Natalia Portillo @ 2005-07-25  8:30 UTC (permalink / raw)
  To: qemu-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Please, feel free to put your results in the unofficial OS support  
list http://www.claunia.com/qemu/

El 25/07/2005, a las 7:43, marm.mm@t-online.de escribió:

> Hello,
>
> For a couple of days ago, i have successfully tested FreeBSD (just the
> kernel boot). The kernel boots (from cd), and when I choosed the
> packages to install, the installer, makes the slices  
> (bsdlabels ...). I
> aborted the installation, because I had no more time to do more ...  
> The
> OS seems to work, but I dont have tested network features, sound or  
> the
> XServer. The Version of QEMU is 0.7.0, not the actual CVS. I have
> patched the version to run on freebsd (lrintf, llrintf ..., I dont  
> have
> used the patch from ports, because I dont know).
>
> marm
>
>
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFC5KMzSOHwOb87puQRAnJvAJ9pYd+5Fbs31v3xLWDxGiKj0W/Z6gCfZNmK
Cql4cKOIOFE24UiJ/YSjsOc=
=3NFa
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] Supported OS: FreeBSD 5.3-RELEASE
  2005-07-25  6:43 [Qemu-devel] Supported OS: FreeBSD 5.3-RELEASE marm.mm
  2005-07-25  8:30 ` Natalia Portillo
@ 2005-07-25 16:21 ` Bakul Shah
  2005-07-25 20:26   ` [Qemu-devel] kqemu problem - linux amd64 host, win xp guest Adrian Smarzewski
  2005-07-25 20:45   ` [Qemu-devel] Supported OS: FreeBSD 5.3-RELEASE Juergen Lock
  1 sibling, 2 replies; 6+ messages in thread
From: Bakul Shah @ 2005-07-25 16:21 UTC (permalink / raw)
  To: qemu-devel

Here is what I have learned so far w.r.t. freebsd.  Hope this
helps people running qemu+freebsd.

Qemu versions: qemu-0.7.0s.20050717 & qemu-0.7.1 [1] + kqemu
Host: freebsd-5.x freebsd-6, freebsd-7-current [2]
Processors: P4, AthlonXP, P4 HT[3]
VMs[4]: freebsd-4.x, freebsd-5.x, dragonfly (latest)
    netbsd-1.3.x, redhat linux (don't recall versions), plan9,
    winXP, win2k, win2k3 (an earlier beta) -- all on X86

Notes:
[1] qemu-0.7.1 works with the patches from the current qemu port.
    Hopefully Juergen Lock will update the port soon.
[2] Most of my testing is with -current but generally
    older versions have not given any trouble.
[3] Hyperthreaded P4 + kqemu works fine for the most part but
    I have encountered some problems.  Haven't had time to
    investigate further.
[4] VMs were built using various versions of qemu so they
    may or may not build with the latest qemu.

qemu-system-x86-64 brings up 6.0-BETA1-amd64 into the install
menu but then it (sysinstall) fails to find any disks!  When
stopped at the boot prompt, prior to freebsd kernel booting,
we see that the bios does detect the C disk so this likely
means the freebsd probe code is using some feature that qemu
does not emulate.

Typically I test all unix VMs by fetching sources, rebuilding
everything and rebooting -- this is a pretty good test for
real h/w as well!  I have used only the tap device, not user
mode networking (slirp).  Networking works well enough.  NFS
mounting the host FS works but is rather slow.  I have not
tested sound.  With kqemu VMs run about twice as slow as real
h/w.  Not bad at all!

qemu+gdb works very well for debugging freebsd kernels! (I
believe I sent the details on some freebsd list earlier which
you can search for).

For convenience I use if_bridge and run a local dhcpd that
serves DHCP requests on the bridge0 device.  In addition I
use NAT using pf.  /etc/qemu-ifup looks like this:

#!/bin/sh
sbin/ifconfig $1 up
/sbin/ifconfig bridge0 deletem $1  2>/dev/null
/sbin/ifconfig bridge0 addm $1 

This combination allows me to run multiple VMs (I just
suspend (^Z) the ones not in use).  The only fiddling I do is
to use a script to ensure that different VMs use different
MAC address.

-- bakul

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] kqemu problem - linux amd64 host, win xp guest
  2005-07-25 16:21 ` Bakul Shah
@ 2005-07-25 20:26   ` Adrian Smarzewski
  2005-07-25 20:45   ` [Qemu-devel] Supported OS: FreeBSD 5.3-RELEASE Juergen Lock
  1 sibling, 0 replies; 6+ messages in thread
From: Adrian Smarzewski @ 2005-07-25 20:26 UTC (permalink / raw)
  To: qemu-devel

host:
Linux laptok 2.6.12-gentoo-r6 #1 Fri Jul 22 10:21:50 CEST 2005 x86_64 
AMD Athlon(tm) 64 Processor 3400+ AuthenticAMD GNU/Linux

guest:
Windows XP Home Edition, Service Pack 2 + all updates

qemu:
0.7.1: i386-softmmu, x86_64-softmmu, x86_64-softmmu + kqemu

problem:
Everything works with i386-softmmu and x86_64-softmmu.
Problems with kqemu: win xp displays only the
"We apologize for inconvenience, but Windows did not start
successfully. A recent hardware or software change might have
caused this." screen all the time.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] Supported OS: FreeBSD 5.3-RELEASE
  2005-07-25 16:21 ` Bakul Shah
  2005-07-25 20:26   ` [Qemu-devel] kqemu problem - linux amd64 host, win xp guest Adrian Smarzewski
@ 2005-07-25 20:45   ` Juergen Lock
  2005-07-25 22:38     ` Jung-uk Kim
  1 sibling, 1 reply; 6+ messages in thread
From: Juergen Lock @ 2005-07-25 20:45 UTC (permalink / raw)
  To: qemu-devel

On Mon, Jul 25, 2005 at 09:21:47AM -0700, Bakul Shah wrote:
> Here is what I have learned so far w.r.t. freebsd.  Hope this
> helps people running qemu+freebsd.
> 
> Qemu versions: qemu-0.7.0s.20050717 & qemu-0.7.1 [1] + kqemu
> Host: freebsd-5.x freebsd-6, freebsd-7-current [2]
> Processors: P4, AthlonXP, P4 HT[3]
> VMs[4]: freebsd-4.x, freebsd-5.x, dragonfly (latest)
>     netbsd-1.3.x, redhat linux (don't recall versions), plan9,
>     winXP, win2k, win2k3 (an earlier beta) -- all on X86
> 
> Notes:
> [1] qemu-0.7.1 works with the patches from the current qemu port.
>     Hopefully Juergen Lock will update the port soon.
>...

I just sent a request for help with the new kqemu to the
FreeBSD lists, maybe I should have Cc'd this one:

Hi!

 Fabrice has released a new version of kqemu that now also
supports amd64 hosts, but as he doesnt know FreeBSD (and my
kernel foo is far from being good enough, neither do i have
an amd64 box) we need someone to port the wrapper to amd64.
Actually the i386 wrapper he has now added to the release
(kqemu-0.7.1.tar.gz) doesnt work either (not sure what happened
there, it doesnt even build), so we need someone to fix/update
that as well.  I have made an update for the port that can be
used as a template (only non-kqemu build works), I'll append it
below:

Removed files: files/BSDmakefile files/kmod_bsd.c
New files: files/kqemu-Makefile-patch files/patch-libmath2 files/patch-vl.c

 (btw patch-vl.c is from Andrey V. Elsukov, it enables kernel
debugging via virtual serial console, as posted on -ports:

# qemu -hda disk.img -cdrom 6.0-BETA1.iso -serial pty
# gdb
(gdb) target remote /dev/ptyp0
....)

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/Makefile,v
retrieving revision 1.27
diff -u -r1.27 Makefile
--- Makefile	19 Jul 2005 06:06:56 -0000	1.27
+++ Makefile	25 Jul 2005 16:52:49 -0000
@@ -6,12 +6,9 @@
 #
 
 PORTNAME=	qemu
-PORTVERSION=	0.7.0s.20050717
+PORTVERSION=	0.7.1
 CATEGORIES=	emulators
-MASTER_SITES=	http://www.qemu.org/ \
-		http://people.fruitsalad.org/nox/qemu/ \
-		http://dad-answers.com/qemu/
-DISTNAME=	${PORTNAME}-snapshot-2005-07-17_23
+MASTER_SITES=	http://www.qemu.org/
 EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
 
 MAINTAINER=	nox@jelal.kn-bremen.de
@@ -23,12 +20,12 @@
 .endif
 
 .if defined(WITH_KQEMU)
-DISTKQEMU=	kqemu-0.6.2-1.tar.gz
+DISTKQEMU=	kqemu-0.7.1.tar.gz
 DISTFILES=	${EXTRACT_ONLY} ${DISTKQEMU}
+EXTRA_PATCHES=	${FILESDIR}/kqemu-Makefile-patch
 .endif
 
 HAS_CONFIGURE=	yes
-USE_BZIP2=	yes
 USE_GMAKE=	yes
 USE_GETOPT_LONG=	yes
 USE_SDL=	sdl
@@ -85,7 +82,7 @@
 .if defined(WITH_KQEMU)
 post-extract:
 	@cd ${WRKSRC} && ${TAR} xfz ${_DISTDIR}/${DISTKQEMU}
-	@${CP} ${FILESDIR}/BSDmakefile ${FILESDIR}/kmod_bsd.c ${WRKSRC}/kqemu
+	@${LN} -s Makefile.freebsd ${WRKSRC}/kqemu/BSDmakefile
 .endif
 
 pre-patch:
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/distinfo,v
retrieving revision 1.20
diff -u -r1.20 distinfo
--- distinfo	19 Jul 2005 06:06:56 -0000	1.20
+++ distinfo	25 Jul 2005 16:40:12 -0000
@@ -1,4 +1,4 @@
-MD5 (qemu-snapshot-2005-07-17_23.tar.bz2) = 5d21295c1f328ea00de19a54715ee7c3
-SIZE (qemu-snapshot-2005-07-17_23.tar.bz2) = 1114748
-MD5 (kqemu-0.6.2-1.tar.gz) = c6bb3b40fb3d526d731eb0f1f9dee7ee
-SIZE (kqemu-0.6.2-1.tar.gz) = 21002
+MD5 (qemu-0.7.1.tar.gz) = b0c80d2c082049a5b8ccbc7f55fe165b
+SIZE (qemu-0.7.1.tar.gz) = 1338521
+MD5 (kqemu-0.7.1.tar.gz) = 8fc7967492b2157521198f6639218420
+SIZE (kqemu-0.7.1.tar.gz) = 76135
Index: files/kqemu-Makefile-patch
@@ -0,0 +1,13 @@
+Index: qemu/kqemu/Makefile.freebsd
+@@ -1,6 +1,10 @@
+ # $Id: Makefile.freebsd,v 1.1 2005/04/17 17:21:31 bellard Exp $
+ KMOD=	kqemu
+-SRCS=	kmod-freebsd.c
++SRCS=	kqemu-freebsd.c
+ OBJS=	kqemu-mod-i386.o
++.if ${OSVERSION} >= 500000
++CC=    cc
++.endif
++WERROR=
+ 
+ .include <bsd.kmod.mk>
Index: files/patch-libmath2
@@ -0,0 +1,67 @@
+Index: qemu/bsd/Makefile
+@@ -16,7 +16,8 @@
+ 	${MACHINE_ARCH}/s_rintl.c	\
+ 	${MACHINE_ARCH}/s_round.c	\
+ 	${MACHINE_ARCH}/s_sinl.S	\
+-	${MACHINE_ARCH}/s_tanl.S
++	${MACHINE_ARCH}/s_tanl.S	\
++	${MACHINE_ARCH}/s_ldexpl.c
+ 
+ OBJS=	${SRCS:R:S/$/.o/}
+ 
+Index: qemu/bsd/i386/s_ldexpl.c
+@@ -0,0 +1,21 @@
++#include <math.h>
++#include <errno.h>
++#include <sysdep.h>
++
++long double __ldexpl(long double x, int expn)
++{
++  long double res;
++  if (!isfinite (x) || x == 0.0L)
++    return x;
++
++  __asm__ ("fscale"
++  	    : "=t" (res)
++	    : "0" (x), "u" ((long double) expn));
++
++  if (!isfinite (res) || res == 0.0L)
++    errno = ERANGE;
++
++  return res;
++}
++
++weak_alias(__ldexpl,ldexpl)
+Index: qemu/bsd/amd64/s_ldexpl.c
+@@ -0,0 +1,21 @@
++#include <math.h>
++#include <errno.h>
++#include <sysdep.h>
++
++long double __ldexpl(long double x, int expn)
++{
++  long double res;
++  if (!isfinite (x) || x == 0.0L)
++    return x;
++
++  __asm__ ("fscale"
++  	    : "=t" (res)
++	    : "0" (x), "u" ((long double) expn));
++
++  if (!isfinite (res) || res == 0.0L)
++    errno = ERANGE;
++
++  return res;
++}
++
++weak_alias(__ldexpl,ldexpl)
+Index: qemu/target-i386/helper.c
+@@ -2886,6 +2886,8 @@
+     ST0 = floatx_round_to_int(ST0, &env->fp_status);
+ }
+ 
++long double	ldexpl(long double, int);
++
+ void helper_fscale(void)
+ {
+     ST0 = ldexp (ST0, (int)(ST1)); 
Index: files/patch-vl.c
@@ -0,0 +1,21 @@
+Index: qemu/vl.c
+@@ -40,6 +40,10 @@
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <dirent.h>
++#ifdef __FreeBSD__
++#include <sys/types.h>
++#include <libutil.h>
++#endif
+ #ifdef _BSD
+ #include <sys/stat.h>
+ #ifndef __APPLE__
+@@ -1280,7 +1284,7 @@
+     return chr;
+ }
+ 
+-#if defined(__linux__)
++#if defined(__linux__) || defined(__FreeBSD__)
+ CharDriverState *qemu_chr_open_pty(void)
+ {
+     char slave_name[1024];

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] Supported OS: FreeBSD 5.3-RELEASE
  2005-07-25 20:45   ` [Qemu-devel] Supported OS: FreeBSD 5.3-RELEASE Juergen Lock
@ 2005-07-25 22:38     ` Jung-uk Kim
  0 siblings, 0 replies; 6+ messages in thread
From: Jung-uk Kim @ 2005-07-25 22:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juergen Lock

On Monday 25 July 2005 04:45 pm, Juergen Lock wrote:
> I just sent a request for help with the new kqemu to the
> FreeBSD lists, maybe I should have Cc'd this one:

Updated the patch here:

http://docs.freebsd.org/cgi/mid.cgi?200507251825.51540.jkim

Thanks,

Jung-uk Kim

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-07-25 23:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-25  6:43 [Qemu-devel] Supported OS: FreeBSD 5.3-RELEASE marm.mm
2005-07-25  8:30 ` Natalia Portillo
2005-07-25 16:21 ` Bakul Shah
2005-07-25 20:26   ` [Qemu-devel] kqemu problem - linux amd64 host, win xp guest Adrian Smarzewski
2005-07-25 20:45   ` [Qemu-devel] Supported OS: FreeBSD 5.3-RELEASE Juergen Lock
2005-07-25 22:38     ` Jung-uk Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).