Running QEMU on FreeBSD)]
-----Forwarded Message-----
From: Antony T Curtis <[email protected]>
To: Juergen Lock <[email protected]>
Subject: Re: qemu port (was: Re: [Qemu-devel] Running QEMU on FreeBSD)
Date: Thu, 03 Jun 2004 10:41:00 +0100
Quoted 11 lines · Juergen Lock
Quoted 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;
}
Quoted 8 lines
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?)
This is from a access check in the if_tap module. If you look at /usr/src/sys/net/if_tap.c, you will notice that there is a check for the uid == 0 in the open path. It needs to be commented out.
Quoted 1 line
- slirp (usermode networking) compiles but doesn't seem to work for me
I haven't tried it.
Quoted 5 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 haven't tried running QEMU on 4.x
Quoted 2 lines
- using physical media doesn't work on 4.x hosts (missing DIOCGMEDIASIZE ioctl)
On 4.x you have to use something like...
if (!ioctl(fd, FIOCGDINFO, &disklabel)) {
int cyls = disklabel.d_ncylinders;
int heads = disklabel.d_ntracks;
int sectors = disklabel.d_nsectors;
disksize_in_sectors = cyls * heads * sectors;
}
Quoted 4 lines
Testers and anyone who has ideas about these problems welcome...
Juergen
FLAGS (\Seen))
Quoted 8 lines · Antony T Curtis
Quoted 7 lines · Juergen Lock
Quoted 1 line · Antony T Curtis
...
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.)
Is committed now btw.
Quoted 9 lines
Quoted 4 lines
I've noticed the following things tho:
- needs to run as root in order to use
/dev/tap*networking (why?)This is from a access check in the
if_tapmodule. If you look at/usr/src/sys/net/if_tap.c, you will notice that there is a check for the uid == 0 in the open path. It needs to be commented out.
Heh. I wonder why that check was put there in the first place,
since you can as well restrict access by adjusting permissions on the device node...
Quoted 4 lines
Quoted 1 line
- slirp (usermode networking) compiles but doesn't seem to work for me
I haven't tried it.
Fix (dhcp bug) is in cvs, will update the port later...
Quoted 8 lines
Quoted 5 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 haven't tried running QEMU on 4.x
I've now tried it on 5.2.1 host and the exact same thing happens
there also: works on installed 5.2.1 guest, broken with FreeSBIE 1.0 and knoppix 3.4.
Quoted 8 lines
Quoted 2 lines
- using physical media doesn't work on 4.x hosts (missing DIOCGMEDIASIZE ioctl)
On 4.x you have to use something like...
if (!ioctl(fd, FIOCGDINFO, &disklabel)) {
int cyls = disklabel.d_ncylinders;
int heads = disklabel.d_ntracks;
hmm, heads == tracks?
Quoted 4 lines
int sectors = disklabel.d_nsectors;
disksize_in_sectors= cyls * heads * sectors;
}
And what about devices bigger than 1023*255*63 sectors, or whatever
the limit there was?
Juergen