Running QEMU on FreeBSD
Hi guys,
I have managed to make QEMU 5.5 (downloaded tarball from web site) and have successfully made it compile and run on FreeBSD-5-CURRENT
However, the problem I have is that the QEMU window does not update and to see what is on the 'screen', I have to do a screendump and examine the image file - obviously non-optimal. So far, I have successfully run the freedos sample image.
I have not managed to make QEMU compile under FreeBSD 4.9 ... The system compiler (GCC 2.95) does not understand many of the constructs used in the source.
Signature · 1 line
Antony T Curtis <[email protected]>
Quoted 2 lines
However, the problem I have is that the QEMU window does not update and to see what is on the 'screen'
Maybe you should give the CVS version a try. I am also running FreeBSD 5 -CURRENT and it works beautifully for me. Actually, I have just installed Windows XP inside QEMU on FreeBSD. However, you will probably need to apply the patch I posted to the list earlier today in order to make the CVS version compile on FreeBSD.
Quoted 2 lines
The system compiler (GCC 2.95) does not understand many of the constructs used in the source.
I don't believe QEMU can be compiled with GCC 2.x at all. That line of GCC is just too broken. However, on FreeBSD 4.x you can still use the lang/gcc32, lang/gcc33, or lang/gcc34 port if you want to try compiling QEMU with GCC 3.x. Though, frankly, I don't see much point in wasting time on that. FreeBSD 5.x is the future ;).
Regards,
- Bartosz Fabianowski
Quoted 8 lines · Bartosz Fabianowski
Quoted 2 lines
However, the problem I have is that the QEMU window does not update and to see what is on the 'screen'
Maybe you should give the CVS version a try. I am also running FreeBSD 5 -CURRENT and it works beautifully for me. Actually, I have just installed Windows XP inside QEMU on FreeBSD. However, you will probably need to apply the patch I posted to the list earlier today in order to make the CVS version compile on FreeBSD.
Actually, I found the problem (a bit of debug code I left behind) and QEMU is now working well :) .
I only just subscribed to the list so ... I haven't seen your patches yet... Ho hum... duplication of effort I think... I even put in code to use the if_tap interface, but so far it's untested.
Does the version in CVS offer much more than the 0.5.5 I downloaded and built from?
And one of the things I am interested in doing is having a working OS/2 on my P4 laptop (OS/2 doesn't install on it) and maybe booting the XP partition from FreeBSD.
Quoted 8 lines
Quoted 2 lines
The system compiler (GCC 2.95) does not understand many of the constructs used in the source.
I don't believe QEMU can be compiled with GCC 2.x at all. That line of GCC is just too broken. However, on FreeBSD 4.x you can still use the lang/gcc32, lang/gcc33, or lang/gcc34 port if you want to try compiling QEMU with GCC 3.x. Though, frankly, I don't see much point in wasting time on that. FreeBSD 5.x is the future ;).
Well - I have most of it compiling on FreeBSD 4.9 already... but I'm going to try with gcc33 on 4 soon (as soon as the gcc33 port finishes building maybe)
Thanks anyways
Signature · 1 line
Antony T Curtis <[email protected]>
Quoted 1 line
I even put in code to use the
if_tapinterface, but so far it's untested.
It's all in CVS already ;). There was a set of patches posted in March and then updated in April I think that got committed recently. It was in the list's archive, but for some reason the archive vanished this morning.
Quoted 1 line
Does the version in CVS offer much more than the 0.5.5 I downloaded and built from?
It has most FreeBSD patches built in. It has some bug fixes. It allows you to install FreeBSD inside QEMU. Quite cool.
Quoted 1 line
And one of the things I am interested in doing is having a working OS/2 on my P4 laptop (OS/2 doesn't install on it) and maybe booting the XP partition from FreeBSD.
XP works inside QEMU, I can confirm that. But some of the Windows updates didn't want to install. No clue why. Another problem is that because there is no long double type in FreeBSD yet, the FPU emulation is a bit hackish and you get stuff like this:
http://www.fabianowski.de/long_double.png
Best regards,
- Bartosz Fabianowski
Quoted 7 lines · Bartosz Fabianowski
Quoted 2 lines
I even put in code to use the
if_tapinterface, but so far it's untested.It's all in CVS already ;). There was a set of patches posted in March and then updated in April I think that got committed recently. It was in the list's archive, but for some reason the archive vanished this morning.
Quoted 5 lines
Quoted 2 lines
Does the version in CVS offer much more than the 0.5.5 I downloaded and built from?
It has most FreeBSD patches built in. It has some bug fixes. It allows you to install FreeBSD inside QEMU. Quite cool.
I'll have to check it out then :)
Quoted 10 lines
Quoted 3 lines
And one of the things I am interested in doing is having a working OS/2 on my P4 laptop (OS/2 doesn't install on it) and maybe booting the XP partition from FreeBSD.
XP works inside QEMU, I can confirm that. But some of the Windows updates didn't want to install. No clue why. Another problem is that because there is no long double type in FreeBSD yet, the FPU emulation is a bit hackish and you get stuff like this:
Hmm... gcc 3.3 does support long doubles...
I pulled in some code from Linux for the missing long double functions... So in theory, the binary I have does have long double support ;)
Quoted 9 lines
Best regards,
- Bartosz Fabianowski_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
FLAGS (\Recent \Seen))
Quoted 3 lines
I pulled in some code from Linux for the missing long double functions... So in theory, the binary I have does have long double support ;)
Nice one. As far as I can tell from various mailing lists and bug reports, somebody is working on adding the long double rounding functions to FreeBSD's libc. Of course, they won't be able to use code from Linux due to licensing issues. So until that work is finished, maybe you could submit your patches so somebody could commit it to QEMU? I'd love to have long doubles in QEMU and don't want to duplicate your work.
Regards,
- Bartosz Fabianowski
Quoted 10 lines · Bartosz Fabianowski
Quoted 3 lines
I pulled in some code from Linux for the missing long double functions... So in theory, the binary I have does have long double support ;)
Nice one. As far as I can tell from various mailing lists and bug reports, somebody is working on adding the long double rounding functions to FreeBSD's libc. Of course, they won't be able to use code from Linux due to licensing issues. So until that work is finished, maybe you could submit your patches so somebody could commit it to QEMU? I'd love to have long doubles in QEMU and don't want to duplicate your work.
Sure... I'll generate some diffs soon...
Meanwhile, I've done a few more mods so that QEMU can use FreeBSD's devices... so that I can specify put "-cdrom /dev/cdrom" on the command line - successfully booted off a FreeBSD install cdrom :D
Haven't successfully booted the XP partition, it hangs but I think it could be down to partitionmagic doing something odd.
qemu-mkcow has also been amended to cope with devices in FreeBSD...
Quoted 9 lines
Regards,
- Bartosz Fabianowski_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
FLAGS (\Recent \Seen))
Quoted 5 lines · Antony T Curtis
Quoted 4 lines · Bartosz Fabianowski
Quoted 3 lines
I pulled in some code from Linux for the missing long double functions... So in theory, the binary I have does have long double support ;)
Quoted 8 lines
Quoted 6 lines
Nice one. As far as I can tell from various mailing lists and bug reports, somebody is working on adding the long double rounding functions to FreeBSD's libc. Of course, they won't be able to use code from Linux due to licensing issues. So until that work is finished, maybe you could submit your patches so somebody could commit it to QEMU? I'd love to have long doubles in QEMU and don't want to duplicate your work.
Sure... I'll generate some diffs soon...
I have checked out te code from CVS and I am integrating my changes.
Attached is my FreeBSD diffs... (includes your diff)
More to come soon - including my diffs to enable using device nodes directly instead of files for hard drives and cdroms.
Signature · 1 line
Antony T Curtis <[email protected]>
diff -BcNpPr --exclude=CVS /home/antony/cvs/qemu/Makefile qemu-0.5.5/Makefile
*** /home/antony/cvs/qemu/Makefile Mon May 17 21:06:42 2004
--- qemu-0.5.5/Makefile Sun May 30 05:26:19 2004
*************** TAGS:
*** 70,76 ****
# documentation %.html: %.texi ! texi2html -monolithic -number $<
qemu.1: qemu-doc.texi
./texi2pod.pl $< qemu.pod
--- 70,76 ----
# documentation %.html: %.texi ! -texi2html -monolithic -number $<
qemu.1: qemu-doc.texi
./texi2pod.pl $< qemu.pod
diff -BcNpPr --exclude=CVS /home/antony/cvs/qemu/configure qemu-0.5.5/configure
*** /home/antony/cvs/qemu/configure Thu May 20 14:23:39 2004
--- qemu-0.5.5/configure Sun May 30 05:42:05 2004
*************** echo "TARGET_DIRS=$target_list" >> $conf
*** 419,427 ****
--- 419,429 ----
if [ "$bsd" = "yes" ] ; then
echo "#define O_LARGEFILE 0" >> $config_h
echo "#define lseek64 lseek" >> $config_h
+ echo "#define mkstemp64 mkstemp" >> $config_h
echo "#define ftruncate64 ftruncate" >> $config_h
echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_h
echo "#define _BSD 1" >> $config_h
+ echo "#define off64_t off_t" >> $config_h
fi
for target in $target_list; do
diff -BcNpPr --exclude=CVS /home/antony/cvs/qemu/target-i386/cpu.h qemu-0.5.5/target-i386/cpu.h
*** /home/antony/cvs/qemu/target-i386/cpu.h Thu May 20 15:01:56 2004
--- qemu-0.5.5/target-i386/cpu.h Sun May 30 05:16:10 2004
*************** enum {
*** 259,265 ****
CC_OP_NB,
};
! #if (defined(__i386__) || defined(__x86_64__)) && !defined(_BSD)
#define USE_X86LDOUBLE
#endif
--- 259,265 ----
CC_OP_NB,
};
! #if defined(__i386__) || defined(__x86_64__)
#define USE_X86LDOUBLE
#endif
diff -BcNpPr --exclude=CVS /home/antony/cvs/qemu/target-i386/exec.h qemu-0.5.5/target-i386/exec.h
*** /home/antony/cvs/qemu/target-i386/exec.h Sat May 29 12:08:52 2004
--- qemu-0.5.5/target-i386/exec.h Sun May 30 05:19:43 2004
*************** static inline void stfl(void *ptr, float
*** 293,298 ****
--- 293,314 ----
#endif /* !defined(CONFIG_USER_ONLY) */
+ #if defined(_BSD) && defined(USE_X86LDOUBLE)
+ #include <math.h>
+ /*int rintl(long double __x);
+ long int lrintl(long double __x);
+ long long int llrintl(long double __x);
+ long double powl(long double __x, long double __y);
+ long double logl(long double __x);
+ long double tanl(long double __x);
+ long double atan2l(long double __y, long double __x);
+ long double ceill(long double __x);
+ long double floorl(long double __x);
+ long double sqrtl(long double __x);
+ long double sinl(long double __x);
+ long double cosl(long double __x);*/
+ #endif
+
#ifdef USE_X86LDOUBLE
/* use long double functions */
#define lrint lrintl
*************** static inline void stfl(void *ptr, float *** 310,316 ****
#define rint rintl
#endif
! #if !defined(_BSD)
extern int lrint(CPU86_LDouble x);
extern int64_t llrint(CPU86_LDouble x);
#else
--- 326,332 ----
#define rint rintl
#endif
! #if !defined(_BSD) || defined(USE_X86LDOUBLE)
extern int lrint(CPU86_LDouble x);
extern int64_t llrint(CPU86_LDouble x);
#else
diff -BcNpPr --exclude=CVS /home/antony/cvs/qemu/target-i386/op.c qemu-0.5.5/target-i386/op.c
*** /home/antony/cvs/qemu/target-i386/op.c Sat May 29 12:08:52 2004
--- qemu-0.5.5/target-i386/op.c Sun May 30 05:40:54 2004
*************** CCTable cc_table[CC_OP_NB] = {
*** 1304,1309 ****
--- 1304,1452 ----
functions comes from the LGPL'ed x86 emulator found in the Willows
TWIN windows emulator. */
+ #if defined(_BSD) && defined(USE_X86LDOUBLE)
+
+ CPU86_LDouble rintl(CPU86_LDouble __x) {
+ CPU86_LDouble __rintres;
+ __asm__ __volatile__
+ ("fistp %0"
+ : "=m" (__rintres) : "t" (__x) : "st");
+ return __rintres;
+ }
+
+ int lrintl(CPU86_LDouble __x) {
+ int __lrintres;
+ __asm__ __volatile__
+ ("fistpl %0"
+ : "=m" (__lrintres) : "t" (__x) : "st");
+ return __lrintres;
+ }
+
+
+ int64_t llrintl(CPU86_LDouble __x) {
+ int64_t __llrintres;
+ __asm__ __volatile__
+ ("fistpll %0"
+ : "=m" (__llrintres) : "t" (__x) : "st");
+ return __llrintres;
+ }
+
+ CPU86_LDouble powl(CPU86_LDouble __x, CPU86_LDouble __y) {
+ register CPU86_LDouble __value; + register long double __exponent; + __extension__ long long int __p = (long long int) __y; + if (__x == 0.0)
+ {
+ if (__y > 0.0)
+ return __y == (double) __p && (__p & 1) != 0 ? __x : 0.0;
+ else if (__y < 0.0)
+ return (__y == (double) __p && (-__p & 1) != 0
+ ? 1.0 / __x : 1.0 / fabs (__x));
+ }
+ if (__y == (double) __p)
+ {
+ long double __r = 1.0;
+ if (__p == 0)
+ return 1.0;
+ if (__p < 0)
+ {
+ __p = -__p;
+ __x = 1.0 / __x;
+ }
+ while (1)
+ {
+ if (__p & 1)
+ __r *= __x;
+ __p >>= 1;
+ if (__p == 0)
+ return __r;
+ __x *= __x;
+ }
+ /* NOTREACHED */
+ }
+ __asm __volatile__
+ ("fyl2x" : "=t" (__value) : "0" (__x), "u" (1.0) : "st(1)");
+ __asm __volatile__
+ ("fmul %%st(1) # y * log2(x)\n\t"
+ "fst %%st(1)\n\t" + "frndint # int(y * log2(x))\n\t" + "fxch\n\t" + "fsub %%st(1) # fract(y * log2(x))\n\t" + "f2xm1 # 2^(fract(y * log2(x))) - 1\n\t" + : "=t" (__value), "=u" (__exponent) : "0" (__y), "1" (__value));
+ __value += 1.0;
+ __asm __volatile__
+ ("fscale"
+ : "=t" (__value) : "0" (__value), "u" (__exponent));
+ return __value;
+ }
+
+ CPU86_LDouble logl(CPU86_LDouble __x) {
+ register CPU86_LDouble __result;
+ __asm __volatile__ ("fldln2; fxch; fyl2x" : "=t" (__result) : "0" (__x) : "st(1)");
+ return __result;
+ }
+
+ CPU86_LDouble tanl(CPU86_LDouble __x) {
+ register CPU86_LDouble __value;
+ register CPU86_LDouble __value2 __attribute__ ((__unused__));
+ __asm __volatile__+ ("fptan"
+ : "=t" (__value2), "=u" (__value) : "0" (__x));
+ return __value;
+ }
+
+ CPU86_LDouble atan2l(CPU86_LDouble __y, CPU86_LDouble __x) {
+ register CPU86_LDouble __value;
+ __asm __volatile__
+ ("fpatan"
+ : "=t" (__value) : "0" (__x), "u" (__y) : "st(1)");
+ return __value;
+ }
+
+ CPU86_LDouble ceill(CPU86_LDouble __x) {
+ register CPU86_LDouble __value;
+ __volatile unsigned short int __cw;
+ __volatile unsigned short int __cwtmp;
+ __asm __volatile ("fnstcw %0" : "=m" (__cw));
+ __cwtmp = (__cw & 0xf3ff) | 0x0800; /* rounding up */
+ __asm __volatile ("fldcw %0" : : "m" (__cwtmp));
+ __asm __volatile ("frndint" : "=t" (__value) : "0" (__x));
+ __asm __volatile ("fldcw %0" : : "m" (__cw));
+ return __value;
+ }
+
+ CPU86_LDouble floorl(CPU86_LDouble __x) {
+ register CPU86_LDouble __value;
+ __volatile unsigned short int __cw;
+ __volatile unsigned short int __cwtmp;
+ __asm __volatile ("fnstcw %0" : "=m" (__cw));
+ __cwtmp = (__cw & 0xf3ff) | 0x0400; /* rounding down */
+ __asm __volatile ("fldcw %0" : : "m" (__cwtmp));
+ __asm __volatile ("frndint" : "=t" (__value) : "0" (__x));
+ __asm __volatile ("fldcw %0" : : "m" (__cw));
+ return __value;
+ }
+
+ CPU86_LDouble sqrtl(CPU86_LDouble __x) {
+ register CPU86_LDouble __result;
+ __asm __volatile__ ("fsqrt" : "=t" (__result) : "0" (__x));
+ return __result;
+ }
+
+ CPU86_LDouble sinl(CPU86_LDouble __x) {
+ register CPU86_LDouble __result;
+ __asm __volatile__ ("fsin" : "=t" (__result) : "0" (__x));
+ return __result;
+ }
+
+ CPU86_LDouble cosl(CPU86_LDouble __x) {
+ register CPU86_LDouble __result;
+ __asm __volatile__ ("fcos" : "=t" (__result) : "0" (__x));
+ return __result;+ }
+ #endif
+
#if defined(__powerpc__)
extern CPU86_LDouble copysign(CPU86_LDouble, CPU86_LDouble);
diff -BcNpPr --exclude=CVS /home/antony/cvs/qemu/vl.c qemu-0.5.5/vl.c
*** /home/antony/cvs/qemu/vl.c Wed May 26 23:12:06 2004
--- qemu-0.5.5/vl.c Sun May 30 05:30:56 2004
*************** int64_t qemu_get_clock(QEMUClock *clock) *** 662,667 ****
--- 662,675 ----
case QEMU_TIMER_REALTIME:
#ifdef _WIN32
return GetTickCount();+ #elif defined(_BSD)
+ {
+ struct timeval r;
+ if (!gettimeofday(&r, NULL)) {
+ return ((CLK_TCK * 1000LL) * (int64_t)r.tv_sec
+ + ((int64_t)r.tv_usec * CLK_TCK) / 1000) / timer_freq;
+ }
+ }
#else
{
struct tms tp;*************** static void init_timers(void)
*** 828,833 ****
--- 836,842 ----
the emulated kernel requested a too high timer frequency */
getitimer(ITIMER_REAL, &itv);
+ #if defined(__linux__)
if (itv.it_interval.tv_usec > 1000) {
/* try to use /dev/rtc to have a faster timer */
if (start_rtc_timer() < 0)
*************** static void init_timers(void)
*** 843,849 ****
sigaction(SIGIO, &act, NULL);
fcntl(rtc_fd, F_SETFL, O_ASYNC);
fcntl(rtc_fd, F_SETOWN, getpid());
! } else {
use_itimer:
pit_min_timer_count = ((uint64_t)itv.it_interval.tv_usec *
PIT_FREQ) / 1000000;
--- 852,860 ----
sigaction(SIGIO, &act, NULL);
fcntl(rtc_fd, F_SETFL, O_ASYNC);
fcntl(rtc_fd, F_SETOWN, getpid());
! } else
! #endif
! {
use_itimer:
pit_min_timer_count = ((uint64_t)itv.it_interval.tv_usec *
PIT_FREQ) / 1000000;Quoted 4 lines · On Sun, 30 May 2004 00:09:16 +0100 Antony T Curtis…
Sure... I'll generate some diffs soon...
Meanwhile, I've done a few more mods so that QEMU can use FreeBSD's devices... so that I can specify put "-cdrom/dev/cdrom" on the command line - successfully booted off a FreeBSD install cdrom :D
The patch you sent doesn't deal with these issues, right? Could you please make a patch and send it to the list. I've occasionally tried to fix using devices but the patches I've made worked only partially.
Was the problem with CDs due to qemu not reading 2048 blocks or was there something else?
Thanks,
Markus
Quoted 8 lines · Markus Niemistö
Quoted 4 lines · On Sun, 30 May 2004 00:09:16 +0100 Antony T Curtis…
Sure... I'll generate some diffs soon...
Meanwhile, I've done a few more mods so that QEMU can use FreeBSD's devices... so that I can specify put "-cdrom/dev/cdrom" on the command line - successfully booted off a FreeBSD install cdrom :D
Quoted 6 lines
The patch you sent doesn't deal with these issues, right? Could you please make a patch and send it to the list. I've occasionally tried to fix using devices but the patches I've made worked only partially.
Was the problem with CDs due to qemu not reading 2048 blocks or was there something else?
Here is the diffs I am using... What it fixes is the following...
It uses the FreeBSD ioctls to determine the size of the device and when reading the 'header', it reads 2048 bytes.
A similar fix has to be done to qemu-mkcow for it to work.
Signature · 1 line
Antony T Curtis <[email protected]>
diff -BcNpPr -C 4 qemu-0.5.5/block.c qemu-0.5.5-fbsd/block.c
*** qemu-0.5.5/block.c Sat May 8 15:51:18 2004
--- qemu-0.5.5-fbsd/block.c Sun May 30 01:03:08 2004
***************
*** 26,33 ****
--- 26,40 ----
#ifndef _WIN32
#include <sys/mman.h>
#endif
+ #ifdef __FreeBSD__
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+ #include <sys/disk.h>
+ #endif
+
#include "cow.h"
struct BlockDriverState {
int fd; /* if -1, only COW mappings */
*************** BlockDriverState *bdrv_new(const char *d
*** 80,88 ****
int bdrv_open(BlockDriverState *bs, const char *filename, int snapshot)
{
int fd;
int64_t size;
! struct cow_header_v2 cow_header;
#ifndef _WIN32
char template[] = "/tmp/vl.XXXXXX";
int cow_fd;
struct stat st;
--- 87,98 ----
int bdrv_open(BlockDriverState *bs, const char *filename, int snapshot)
{
int fd;
int64_t size;! union {
! struct cow_header_v2 header;
! uint8_t buffer[512*4];
! } cow;
#ifndef _WIN32
char template[] = "/tmp/vl.XXXXXX";
int cow_fd;
struct stat st;
*************** int bdrv_open(BlockDriverState *bs, cons
*** 115,169 ****
bs->read_only = 1;
}
bs->fd = fd;
/* see if it is a cow image */
! if (read(fd, &cow_header, sizeof(cow_header)) != sizeof(cow_header)) {
fprintf(stderr, "%s: could not read header\n", filename);
goto fail;
}
#ifndef _WIN32
! if (be32_to_cpu(cow_header.magic) == COW_MAGIC &&
! be32_to_cpu(cow_header.version) == COW_VERSION) {
/* cow image found */
! size = cow_header.size;
#ifndef WORDS_BIGENDIAN
size = bswap64(size);
#endif
bs->total_sectors = size / 512;
bs->cow_fd = fd;
bs->fd = -1;
! if (cow_header.backing_file[0] != '\0') {
! if (stat(cow_header.backing_file, &st) != 0) {
! fprintf(stderr, "%s: could not find original disk image '%s'\n", filename, cow_header.backing_file);
goto fail;
}
! if (st.st_mtime != be32_to_cpu(cow_header.mtime)) {
! fprintf(stderr, "%s: original raw disk image '%s' does not match saved timestamp\n", filename, cow_header.backing_file);
goto fail;
}
! fd = open(cow_header.backing_file, O_RDONLY | O_LARGEFILE);
if (fd < 0)
goto fail;
bs->fd = fd;
}
! /* mmap the bitmap */
! bs->cow_bitmap_size = ((bs->total_sectors + 7) >> 3) + sizeof(cow_header);
bs->cow_bitmap_addr = mmap(get_mmap_addr(bs->cow_bitmap_size),
bs->cow_bitmap_size,
PROT_READ | PROT_WRITE,
MAP_SHARED, bs->cow_fd, 0);
if (bs->cow_bitmap_addr == MAP_FAILED)
goto fail;
! bs->cow_bitmap = bs->cow_bitmap_addr + sizeof(cow_header);
bs->cow_sectors_offset = (bs->cow_bitmap_size + 511) & ~511;
snapshot = 0;
} else
#endif
{
/* standard raw image */
size = lseek64(fd, 0, SEEK_END);
bs->total_sectors = size / 512;
bs->fd = fd;
}--- 125,189 ----
bs->read_only = 1;
}
bs->fd = fd;+ lseek(fd, 0LL, SEEK_SET);
/* see if it is a cow image */
! if (read(fd, &cow.buffer, sizeof(cow.buffer)) != sizeof(cow.buffer)) {
fprintf(stderr, "%s: could not read header\n", filename);
goto fail;
}
#ifndef _WIN32
! if (be32_to_cpu(cow.header.magic) == COW_MAGIC &&
! be32_to_cpu(cow.header.version) == COW_VERSION) {
/* cow image found */
! size = cow.header.size;
#ifndef WORDS_BIGENDIAN
size = bswap64(size);
#endif
bs->total_sectors = size / 512;
bs->cow_fd = fd;
bs->fd = -1;
! if (cow.header.backing_file[0] != '\0') {
! if (stat(cow.header.backing_file, &st) != 0) {
! fprintf(stderr, "%s: could not find original disk image '%s'\n", filename, cow.header.backing_file);
goto fail;
}
! if (st.st_mtime != be32_to_cpu(cow.header.mtime)) {
! fprintf(stderr, "%s: original raw disk image '%s' does not match saved timestamp\n", filename, cow.header.backing_file);
goto fail;
}
! fd = open(cow.header.backing_file, O_RDONLY | O_LARGEFILE);
if (fd < 0)
goto fail;
bs->fd = fd;
}
! /* mmap thquie bitmap */
! bs->cow_bitmap_size = ((bs->total_sectors + 7) >> 3) + sizeof(cow.header);
bs->cow_bitmap_addr = mmap(get_mmap_addr(bs->cow_bitmap_size),
bs->cow_bitmap_size,
PROT_READ | PROT_WRITE,
MAP_SHARED, bs->cow_fd, 0);
if (bs->cow_bitmap_addr == MAP_FAILED)
goto fail;
! bs->cow_bitmap = bs->cow_bitmap_addr + sizeof(cow.header);
bs->cow_sectors_offset = (bs->cow_bitmap_size + 511) & ~511;
snapshot = 0;
} else
#endif
{
/* standard raw image */+ #ifdef __FreeBSD__
+ if (ioctl(fd, DIOCGMEDIASIZE, (off_t *)&size))
+ size = lseek(fd, 0LL, SEEK_END);
+ #else
size = lseek64(fd, 0, SEEK_END);
+ #endif
+ if (size<0) {
+ fprintf(stderr,"unable to determine size of device\n");
+ goto fail;
+ }
bs->total_sectors = size / 512;
bs->fd = fd;
}Quoted 1 line
Here is the diffs I am using...
Could you make that a unified diff? Context format is horribly hard to read if you want to try and understand the changes (as I am trying to right now...).
- Bartosz
Quoted 5 lines · Bartosz Fabianowski
Quoted 1 line
Here is the diffs I am using...
Could you make that a unified diff? Context format is horribly hard to read if you want to try and understand the changes (as I am trying to right now...).
Okay... new patch is attached
Signature · 1 line
Antony T Curtis <[email protected]>
Makefile renamed from cvs/qemu/Makefile +1 -1
@@ -70,7 +70,7 @@ # documentation %.html: %.texi - texi2html -monolithic -number $< + -texi2html -monolithic -number $< qemu.1: qemu-doc.texi ./texi2pod.pl $< qemu.pod
block.c renamed from cvs/qemu/block.c +30 -13
92 lines not on this page · raw message
Only in qemu-0.5.5: block.c.bck
configure renamed from cvs/qemu/configure +2 -0
@@ -419,9 +419,11 @@ if [ "$bsd" = "yes" ] ; then echo "#define O_LARGEFILE 0" >> $config_h echo "#define lseek64 lseek" >> $config_h + echo "#define mkstemp64 mkstemp" >> $config_h echo "#define ftruncate64 ftruncate" >> $config_h echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_h echo "#define _BSD 1" >> $config_h + echo "#define off64_t off_t" >> $config_h fi for target in $target_list; do
Only in qemu-0.5.5: qemu.1
target-i386/cpu.h renamed from cvs/qemu/target-i386/cpu.h +1 -1
@@ -259,7 +259,7 @@ CC_OP_NB, }; -#if (defined(__i386__) || defined(__x86_64__)) && !defined(_BSD) +#if defined(__i386__) || defined(__x86_64__)#define USE_X86LDOUBLE #endif
target-i386/exec.h renamed from cvs/qemu/target-i386/exec.h +17 -1
@@ -293,6 +293,22 @@#endif /* !defined(CONFIG_USER_ONLY) */ +#if defined(_BSD) && defined(USE_X86LDOUBLE ) +#include <math.h> +/*int rintl(long double __x); +long int lrintl(long double __x); +long long int llrintl(long double __x); +long double powl(long double __x, long double __y); +long double logl(long double __x); +long double tanl(long double __x); +long double atan2l(long double __y, long double __x); +long double ceill(long double __x); +long double floorl(long double __x); +long double sqrtl(long double __x); +long double sinl(long double __x); +long double cosl(long double __x);*/ +#endif +#ifdef USE_X86LDOUBLE /* use long double functions */ #define lrint lrintl
@@ -310,7 +326,7 @@#define rint rintl#endif -#if !defined(_BSD) +#if !defined(_BSD) || defined(USE_X86LDOUBLE )extern int lrint (CPU86_LDouble x);extern int64_t llrint (CPU86_LDouble x);#else
target-i386/op.c renamed from cvs/qemu/target-i386/op.c +143 -0
149 lines not on this page · raw message
vl.c renamed from cvs/qemu/vl.c +12 -1
@@ -662,6 +662,14 @@case QEMU_TIMER_REALTIME :#ifdef _WIN32return GetTickCount (); +#elif defined(_BSD) + { +struct timeval r; +if (!gettimeofday (&r,NULL )) { +return ((CLK_TCK *1000LL ) * (int64_t )r.tv_sec + + ((int64_t )r.tv_usec *CLK_TCK ) /1000 ) / timer_freq; + } + }#else {struct tms tp;
@@ -828,6 +836,7 @@the emulated kernel requested a too high timer frequency */ getitimer (ITIMER_REAL , &itv); +#if defined(__linux__)if (itv.it_interval.tv_usec >1000 ) {/* try to use /dev/rtc to have a faster timer */ if (start_rtc_timer () <0 )
@@ -843,7 +852,9 @@sigaction (SIGIO , &act,NULL );fcntl (rtc_fd,F_SETFL ,O_ASYNC );fcntl (rtc_fd,F_SETOWN ,getpid ()); - }else { + } else +#endif + { use_itimer: pit_min_timer_count = ((uint64_t )itv.it_interval.tv_usec *PIT_FREQ ) /1000000 ;
Seems like your newest patch merges all the FreeBSD patches floating around out there. Good job.
You didn't merge in one small patch of mine though and I am wondering why. The patch I am talking about is the one that makes the configure script look for "sdl11-config" instead of "sdl-config". I have installed the devel/sdl12 port and the name of the executable is "sdl11-config" on my system. It must be "sdl-config" on your system since you didn't include this little patch. And I am curious as to why you have a different file name. How did you install the SDL? From the ports? If so, which port?
- Bartosz
Quoted 11 lines · Bartosz Fabianowski
Seems like your newest patch merges all the FreeBSD patches floating around out there. Good job.
You didn't merge in one small patch of mine though and I am wondering why. The patch I am talking about is the one that makes the configure script look for "sdl11-config" instead of "sdl-config". I have installed the devel/sdl12 port and the name of the executable is "sdl11-config" on my system. It must be "sdl-config" on your system since you didn't include this little patch. And I am curious as to why you have a different file name. How did you install the SDL? From the ports? If so, which port?
I installed it via the ports but I have a symlink in /usr/local/bin because of a few things which I build from tarballs.
Most people will not have that symlink so it would be a good idea to add in your change,
I just discovered another problem with your patch.
Before applying your patch, I was using my own hack that resorted to normal precision doubles for FPU emulation. This resulted in incorrect rounding as could be easily seen when running Windows Update. The total number of megabytes to download was something like 10.99999999999998. Obviously, something had gone wrong with precision and rounding.
However, after I have applied your patch, which imports from Linux the functions required to use long doubles, the situation got worse. The total number of megabytes to be downloaded by Windows Update is now shown as NaN. I know from previous installs that it should be a moderately sized number, something such as 10 or 20 megabytes. So it's not the rounding of an immensely large number or of a ridiculously small one that is going wrong. There is some other issue surfacing here that makes a perfectly normal-sized floating point number become a NaN.
It's 2:30am here in Europe right now and I won't investigate this further tonight. But if you have time to, maybe you can have a look and see if you can find the source of this problem.
- Bartosz
Quoted 8 lines · Bartosz Fabianowski
I just discovered another problem with your patch.
Before applying your patch, I was using my own hack that resorted to normal precision doubles for FPU emulation. This resulted in incorrect rounding as could be easily seen when running Windows Update. The total number of megabytes to download was something like 10.99999999999998. Obviously, something had gone wrong with precision and rounding.
Quoted 8 lines
However, after I have applied your patch, which imports from Linux the functions required to use long doubles, the situation got worse. The total number of megabytes to be downloaded by Windows Update is now shown as NaN. I know from previous installs that it should be a moderately sized number, something such as 10 or 20 megabytes. So it's not the rounding of an immensely large number or of a ridiculously small one that is going wrong. There is some other issue surfacing here that makes a perfectly normal-sized floating point number become a NaN.
Replace the rintl() function in target-i386/op.c with the following:
CPU86_LDouble rintl(CPU86_LDouble __x) {
register CPU86_LDouble __result;
__asm __volatile__ ("frndint" : "=t" (__result) : "0" (__x)); return __result;
}
Quoted 12 lines
It's 2:30am here in Europe right now and I won't investigate this further tonight. But if you have time to, maybe you can have a look and see if you can find the source of this problem.
- Bartosz
_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
FLAGS (\Seen))
This fixes the NaN, but reverts to what my hack did - weird rounding. The total download size for some updates I selected is now reported as 1.6000000000000003 (that's 14 zeros in between). Not quite sure what's going wrong here...
- Bartosz
Quoted 4 lines · Bartosz Fabianowski
This fixes the NaN, but reverts to what my hack did - weird rounding. The total download size for some updates I selected is now reported as 1.6000000000000003 (that's 14 zeros in between). Not quite sure what's going wrong here...
You're either up very, very late, or very early :-)
I didn't see a patch attached to this email. Did my mailer drop it?
Best,
Kyle
Quoted 1 line
You're either up very, very late, or very early :-)
Very late :).
Quoted 1 line
I didn't see a patch attached to this email. Did my mailer drop it?
I was referring to Antony's latest patch. It wasn't quite a patch, in fact, just the following idea:
Replace the rintl() function in target-i386/op.c with the following:
CPU86_LDouble rintl(CPU86_LDouble __x) {
register CPU86_LDouble __result;
__asm __volatile__ ("frndint" : "=t" (__result) : "0" (__x)); return __result;
}
So what I meant to say is that with this change, the FPU stops reporting a NaN when it obviously shouldn't, but starts doing weird rounding again. Sorry if my late-night mail wasn't quite clear.
- Bartosz
Quoted 17 lines · Bartosz Fabianowski
Quoted 1 line
You're either up very, very late, or very early :-)
Very late :).
Quoted 1 line
I didn't see a patch attached to this email. Did my mailer drop it?
I was referring to Antony's latest patch. It wasn't quite a patch, in fact, just the following idea:
Replace the
rintl()function intarget-i386/op.cwith the following:CPU86_LDouble rintl(CPU86_LDouble __x) { register CPU86_LDouble __result; __asm __volatile__ ("frndint" : "=t" (__result) : "0" (__x)); return __result; }
Quoted 3 lines
So what I meant to say is that with this change, the FPU stops reporting a NaN when it obviously shouldn't, but starts doing weird rounding again. Sorry if my late-night mail wasn't quite clear.
I think the errors are being introduced in the routines in target-i386/helper.c
I'm going to investigate replacing them with more 'native' operations
Signature · 1 line
Antony T Curtis <[email protected]>
Quoted 4 lines · Bartosz Fabianowski
This fixes the NaN, but reverts to what my hack did - weird rounding. The total download size for some updates I selected is now reported as 1.6000000000000003 (that's 14 zeros in between). Not quite sure what's going wrong here...
Hmm... do you know if this same behaviour happens with QEMU running on Linux or some other host OS?
Signature · 1 line
Antony T Curtis <[email protected]>
Quoted 2 lines
Hmm... do you know if this same behaviour happens with QEMU running on Linux or some other host OS?
Unfortunately, I only have FreeBSD installed on my computer and can't test this :(.
- Bartosz
Quoted 4 lines · Bartosz Fabianowski
This fixes the NaN, but reverts to what my hack did - weird rounding. The total download size for some updates I selected is now reported as 1.6000000000000003 (that's 14 zeros in between). Not quite sure what's going wrong here...
Ok... I am curious if the following diff helps it (or makes it worse) It is just a quick hack to use the native fpu instructions instead of manual calculation...
Signature · 1 line
Antony T Curtis <[email protected]>
helper.c renamed from home/antony/cvs/qemu/target-i386/helper.c +58 -0
@@ -2105,7 +2105,12 @@void helper_f2xm1 (void ) { +#ifdef USE_X86LDOUBLE + __asm __volatile__ + ("f2xm1" :"=t" (ST0 ) :"0" (ST0 )); +#else ST0 =pow (2.0 ,ST0 ) -1.0 ; +#endif }void helper_fyl2x (void )
@@ -2114,8 +2119,14 @@ fptemp =ST0 ;if (fptemp>0.0 ){ +#ifdef USE_X86LDOUBLE + __asm __volatile__ + ("fyl2x" + :"=t" (ST1 ) :"0" (fptemp) ,"u" (ST1 )); +#else fptemp =log (fptemp)/log (2.0 );/* log2(ST) */ ST1 *= fptemp; +#endif fpop (); }else { env->fpus &= (~0x4700 );
@@ -2165,6 +2176,19 @@void helper_fprem1 (void ) { +#ifdef USE_X86LDOUBLE +int flags; + __asm __volatile__ + ("fprem1\n\t" +"fnstsw %%ax\n\t" + :"=t" (ST0 ),"=ax" (flags) :"0" (ST0 ) ,"u" (ST1 )); +if (flags &0x400 ) + env->fpus |=0x400 ; +else { + env->fpus &= (~0x4700 ); + env->fpus |= flags &0x07 ; + } +#else CPU86_LDouble dblq, fpsrcop, fptemp;CPU86_LDoubleU fpsrcop1, fptemp1;int expdif;
@@ -2194,10 +2218,24 @@ floor(fpsrcop): ceil(fpsrcop); ST0 -= (ST1 * fpsrcop * fptemp); } +#endif }void helper_fprem (void ) { +#ifdef USE_X86LDOUBLE +int flags; + __asm __volatile__ + ("fprem\n\t" +"fnstsw %%ax\n\t" + :"=t" (ST0 ),"=ax" (flags) :"0" (ST0 ) ,"u" (ST1 )); +if (flags &0x400 ) + env->fpus |=0x400 ; +else { + env->fpus &= (~0x4700 ); + env->fpus |= flags &0x07 ; + } +#else CPU86_LDouble dblq, fpsrcop, fptemp;CPU86_LDoubleU fpsrcop1, fptemp1;int expdif;
@@ -2205,6 +2243,7 @@ fpsrcop =ST0 ; fptemp =ST1 ; + fpsrcop1.d = fpsrcop; fptemp1.d = fptemp; expdif =EXPD (fpsrcop1) -EXPD (fptemp1);
@@ -2227,6 +2266,7 @@ -(floor(fabs(fpsrcop))): floor(fpsrcop); ST0 -= (ST1 * fpsrcop * fptemp); } +#endif }void helper_fyl2xp1 (void )
@@ -2235,8 +2275,13 @@ fptemp =ST0 ;if ((fptemp+1.0 )>0.0 ) { +#ifdef USE_X86LDOUBLE + __asm __volatile__ + ("fyl2xp1" :"=t" (ST1 ) :"0" (fptemp) ,"u" (ST1 )); +#else fptemp =log (fptemp+1.0 ) /log (2.0 );/* log2(ST+1.0) */ ST1 *= fptemp; +#endif fpop (); }else { env->fpus &= (~0x4700 );
@@ -2264,11 +2309,17 @@if ((fptemp >MAXTAN )||(fptemp < -MAXTAN )) { env->fpus |=0x400 ; }else { +#ifdef USE_X86LDOUBLE + __asm __volatile__ + ("fsincos" + :"=t" (ST0 ) ,"=u" (ST1 ) :"0" (ST0 )); +#else ST0 =sin (fptemp);fpush ();ST0 =cos (fptemp); env->fpus &= (~0x400 );/* C2 <-- 0 */ /* the above code is for |arg| < 2**63 only */ +#endif } }
@@ -2301,11 +2352,18 @@void helper_fscale (void ) { +#ifdef USE_X86LDOUBLE + __asm __volatile__ + ("fscale" + :"=t" (ST0 ) :"0" (ST0 ),"u" (ST1 )); +#else CPU86_LDouble fpsrcop, fptemp; fpsrcop =2.0 ; fptemp =pow (fpsrcop,ST1 );ST0 *= fptemp; +#endif + }void helper_fsin (void )
Quoted 3 lines
Ok... I am curious if the following diff helps it (or makes it worse) It is just a quick hack to use the native fpu instructions instead of manual calculation...
Sorry I didn't have time to try it before. Now I have applied the diff and recompiled. It's back to NaN megabytes, which is really weird, as Windows 98, when run natively on this very computer, with this very FPU, reports the right numbers...
- Bartosz
Quoted 8 lines · Bartosz Fabianowski
Quoted 3 lines
Ok... I am curious if the following diff helps it (or makes it worse) It is just a quick hack to use the native fpu instructions instead of manual calculation...
Sorry I didn't have time to try it before. Now I have applied the diff and recompiled. It's back to NaN megabytes, which is really weird, as Windows 98, when run natively on this very computer, with this very FPU, reports the right numbers...
Hmm... my code is obviously broken then.
But I still personally think that there is some error being introduced by 'emulating' those floating point instructions rather than using the actual ones.
Quoted 1 line · Bartosz Fabianowski
This fixes the NaN, but reverts to what my hack did - weird rounding. The total download size for some updates I selected is now reported as 1.6000000000000003 (that's 14 zeros in between). Not quite sure what's going wrong here...
For what it's worth, I regularly see the same thing running Windows XP in Virtual PC (Macintosh host). Not ideal, but somebody thinks it's good enough for a shipping product... That somebody is Microsoft, though, so take with a grain of salt. ;)
-- brion vibber (brion @ pobox.com)
Quoted 1 line
For what it's worth, I regularly see the same thing running Windows XP in Virtual PC (Macintosh host). Not ideal, but somebody thinks it's good enough for a shipping product... That somebody is Microsoft, though, so take with a grain of salt. ;)
I think I read somewhere in QEMU's documentation that the actual x86 uses a non-standard representation for floating point numbers that is neither faithfully represented by double nor by long double. So unless you are willing to sacrifice heaps of speed for perfect emulation, I guess we will have to live with that.
- Bartosz
qemu port (was: Re: [Qemu-devel] Running QEMU on FreeBSD)
In reply to Antony T CurtisQuoted 9 lines · Antony T Curtis
...
Replace the
rintl()function intarget-i386/op.cwith the following:
CPU86_LDoublerintl(CPU86_LDouble __x){
registerCPU86_LDouble__result;
__asm__volatile__("frndint" : "=t" (__result) : "0" (__x)); return__result;
}
OK, I've now taken this and the other FreeBSD patches, added a few small ones of my own and made a port, it can be fetched at
http://www.freebsd.org/cgi/query-pr.cgi?pr=67506&f=raw
(and hopefully will be committed soon.)
I've noticed the following things tho:
- needs to run as root in order to use /dev/tap* networking (why?)
- slirp (usermode networking) compiles but doesn't seem to work for me
- seems to have a timer problem (time sleep 1 takes 49 seconds and booting sleeps for minutes at the acd0 probe), but only on _some_ guest systems (FreeSBIE, knoppix.) An installed 5.2.1 guest system works ok (this also doesn't happen with linux as host.) And enabling /dev/rtc doesn't help either... (not included since it needs a patch to emulators/rtc.)
- using physical media doesn't work on 4.x hosts (missing DIOCGMEDIASIZE ioctl)
Testers and anyone who has ideas about these problems welcome...
Juergen
[Qemu-devel] Re: qemu port
Quoted 1 line
OK, I've now taken this and the other FreeBSD patches, added a few small ones of my own and made a port [...]
Awesome! A port was my original idea and the reason for why I started tinkering with QEMU in the first place.
Quoted 1 line
- needs to run as root in order to use
/dev/tap*networking (why?)
I haven't looked at your port yet, but my own compilation of QEMU has the same problem. It seems to me that this is because on each invocation, QEMU creates a new tap device. Just run QEMU a few times (as root) and then look at the output of ifconfig. Each invocation will have produced a new tap device. Since normal users probably have no permission to create device nodes, QEMU fails to create its required tap device and therefore tap networking doesn't work. A fix for this would be to create a certain amount of tap device nodes at FreeBSD start up and then to have QEMU recycle the nodes it doesn't need any more. Then again, maybe I am totally wrong on what is causing this.
Quoted 2 lines
- using physical media doesn't work on 4.x hosts (missing DIOCGMEDIASIZE ioctl)
This is the place where it's actually used:
if (ioctl(fd, DIOCGMEDIASIZE, (off_t *)&size))
size = lseek(fd, 0LL, SEEK_END);
This ioctl checks whether the total size of the medium can be retrieved and thus only succeeds if there is a medium in the drive. So the ioctl effectively just checks whether there is a medium. The size is then retrieved separately using lseek.
I haven't tried compiling or running this, but my idea would be to try something like this instead:
if((size = lseek(fd, 0LL, SEEK_END)) < 0)
size = 0;Now, lseek is always called. If there is no medium, lseek should fail, returning some negative value. In this case, the size is set to zero to indicate failure. Otherwise, the size determined by lseek is used.
- Bartosz
Re: [Qemu-devel] Re: qemu port
Quoted 4 lines · Bartosz Fabianowski
I haven't tried compiling or running this, but my idea would be to try something like this instead:
if((size = lseek(fd, 0LL, SEEK_END)) < 0) size = 0;
This is the preferred method in Linux now aswell (over and above BLKGETSIZE(64) ioctls).
Signature · 3 lines
// Gianni Tedesco (gianni at scaramanga dot co dot uk) lynx --source www.scaramanga.co.uk/scaramanga.asc | gpg --import 8646BE7D: 6D9F 2287 870E A2C9 8F60 3A3C 91B5 7669 8646 BE7D
Re: [Qemu-devel] Re: qemu port
In reply to Bartosz FabianowskiQuoted 10 lines · Bartosz Fabianowski
Quoted 2 lines
OK, I've now taken this and the other FreeBSD patches, added a few small ones of my own and made a port [...]
Awesome! A port was my original idea and the reason for why I started tinkering with QEMU in the first place.
Quoted 1 line
- needs to run as root in order to use
/dev/tap*networking (why?)I haven't looked at your port yet, but my own compilation of QEMU has the same problem. ...
Problem solved: its a redundant(?) uid check in the if_tap module (btw at least on 4.9 i have to cycle thru the available /dev/tap[0123] device nodes myself, see patch-bt)
Quoted 5 lines
Quoted 2 lines
- using physical media doesn't work on 4.x hosts (missing DIOCGMEDIASIZE ioctl)
This is the place where it's actually used:
Quoted 8 lines
if (
ioctl(fd, DIOCGMEDIASIZE, (off_t *)&size))size = lseek(fd, 0LL, SEEK_END);This ioctl checks whether the total size of the medium can be retrieved and thus only succeeds if there is a medium in the drive. So the ioctl effectively just checks whether there is a medium. The size is then retrieved separately using lseek.
...
Heh. :) No. ioctl() returns 0 on success not on failure, so
only if the ioctl fails is the size retrieved via lseek (and this lseek method doesnt work on pyhsical devices, therefore the ioctl.)
Juergen
[Qemu-devel] FreeSBIE timer (was: Re: qemu port)
In reply to Juergen LockIn article <[email protected]> I wrioe:
Quoted 6 lines
...
- seems to have a timer problem (time sleep 1 takes 49 seconds and booting sleeps for minutes at the acd0 probe), but only on _some_ guest systems (FreeSBIE, knoppix.) An installed 5.2.1 guest system works ok (this also doesn't happen with linux as host.) And enabling/dev/rtcdoesn't help either... (not included since it needs a patch to emulators/rtc.)
I finally found out whats going on there by looking at the FreeSBIE kernel config:
http://cvs.gufi.org/cgi/cvsweb.cgi/freesbie/files/FREESBIE.5?rev=1.15&content-type=text/x-cvsweb-markup
It uses:
options HZ=5000
And the on the linux host the problem is just less obvious because
I'm running a 2.6 kernel there which by default uses 1000 (AFAIK), instead of 100 like FreeBSD by default uses.
Heh :)
Juergen