Re: [Qemu-devel] about NICs
On Fri, 14 Sep 2007 23:25:13 +0200, Christian MICHON [EMAIL PROTECTED] said: Honestly, I thought that NE2000 *was* the de facto standard :P Really ? Look at the other virtualizers/emulators: Realtek RTL8139 is the standard eth0 for MS VirtualPC 2007 it is true NE2K was included by default in NT4, now virtualpc has prefered to use RTL8139... Does it matter ? You can always recompile the module needed and add it to ubuntu (you may need to modify the iso). why the ROM is included in the executable ?
Re: [Qemu-devel] about NICs
On Fri, 14 Sep 2007 23:25:13 +0200, Christian MICHON [EMAIL PROTECTED] said: Honestly, I thought that NE2000 *was* the de facto standard :P Really ? Look at the other virtualizers/emulators: Realtek RTL8139 is the standard eth0 for MS VirtualPC 2007 it is true NE2K was included by default in NT4, now virtualpc has prefered to use RTL8139... Does it matter ? You can always recompile the module needed and add it to ubuntu (you may need to modify the iso). why the ROM is included in the executable ? -- Sebastien WILLEMIJNS / __ \ | / | | | \__| | |`-' P-E-R-S-O-S-E-B `--- W-I-L-L-E-M-I-J-N-S-.-C-O-M (ras le bol du spam ! no spam at home !)
[Qemu-devel] Solaris x86_64 configure patch
By default, uname -i returns i86pc on i386 or x86_64 system. This patch makes it possible to for Solaris systems to get the right hardware type. --- qemu.ORIG/configure 2007-08-24 21:37:51.0 -0400 +++ qemu/configure 2007-09-15 08:53:34.288345000 -0400 @@ -155,6 +155,12 @@ install=ginstall needs_libsunmath=no solarisrev=`uname -r | cut -f2 -d.` +# have to select again, because `uname -m` returns i86pc +# even on an x86_64 box. +solariscpu=`isainfo -k` +if test ${solariscpu} = amd64 ; then +cpu=x86_64 +fi if [ $cpu = i386 -o $cpu = x86_64 ] ; then if test $solarisrev -le 9 ; then if test -f /opt/SUNWspro/prod/lib/libsunmath.so.1; then
[Qemu-devel] configure white space cleanup
just cleaning up some annoying at the end of some lines --- qemu/configure.ORIG 2007-09-15 08:58:23.283818000 -0400 +++ qemu/configure 2007-09-15 08:58:34.878425000 -0400 @@ -409,7 +409,7 @@ oss=no fi -# Check for gcc4, error if pre-gcc4 +# Check for gcc4, error if pre-gcc4 if test $check_gcc = yes ; then cat $TMPC EOF #if __GNUC__ 4 @@ -450,7 +450,7 @@ # # gcc for solaris 10/fcs in /usr/sfw/bin doesn't compile qemu correctly # override the check with --disable-gcc-check - # + # if test $solarisrev -eq 10 -a $check_gcc = yes ; then solgcc=`which $cc` if test $solgcc = /usr/sfw/bin/gcc ; then @@ -481,7 +481,7 @@ fi exit 1 fi -fi +fi if test -z $target_list ; then
Re: [Qemu-devel] Solaris x86_64 configure patch
Corrected version of the patch. --- qemu.ORIG/configure 2007-08-24 21:37:51.0 -0400 +++ qemu/configure 2007-09-15 09:07:47.928893000 -0400 @@ -155,6 +155,12 @@ install=ginstall needs_libsunmath=no solarisrev=`uname -r | cut -f2 -d.` +# have to select again, because `uname -m` returns i86pc +# even on an x86_64 box. +solariscpu=`isainfo -k` +if test ${solariscpu} = amd64 ; then +cpu=x86_64 +fi if [ $cpu = i386 -o $cpu = x86_64 ] ; then if test $solarisrev -le 9 ; then if test -f /opt/SUNWspro/prod/lib/libsunmath.so.1; then @@ -333,6 +339,16 @@ ;; esac +if [ $solaris = yes -a $cpu = x86_64 ] ; then +CFLAGS=${CFLAGS} -m64 +OS_CFLAGS=${OS_CFLAGS} -m64 +fi + +if [ $solaris = yes -a $cpu = i386 ] ; then +CFLAGS=${CFLAGS} -m32 +OS_CFLAGS=${OS_CFLAGS} -m32 +fi + if test x$show_help = xyes ; then cat EOF
Re: [Qemu-devel] about NICs
On Fri, Sep 14, 2007 at 09:07:35PM +0200, Sebastien WILLEMIJNS wrote: i noticed ubuntu LiveCD 7.04 QEMU emulation now only works with RTL8139 NICs (because NE2K drivers seems has been deleted from ISO) ne2k-pci is on the Fiesty CD's. Which one did you need? -- Soren Hansen Ubuntu Server Team http://www.ubuntu.com/ signature.asc Description: Digital signature
Re: [Qemu-devel] about NICs
On Sat, 15 Sep 2007 15:23:57 +0200, Soren Hansen [EMAIL PROTECTED] said: On Fri, Sep 14, 2007 at 09:07:35PM +0200, Sebastien WILLEMIJNS wrote: i noticed ubuntu LiveCD 7.04 QEMU emulation now only works with RTL8139 NICs (because NE2K drivers seems has been deleted from ISO) ne2k-pci is on the Fiesty CD's. Which one did you need? with ubuntu 6.04 emulation under QEMU i hasn't need to include a parameter in the qemu commadline with ubuntu 7.04 emulation under QEMU i must add -net nic,vlan=0,model=rtl8139 -net user,vlan=0,hostname=foo ;) -- Sebastien WILLEMIJNS / __ \ | / | | | \__| | |`-' P-E-R-S-O-S-E-B `--- W-I-L-L-E-M-I-J-N-S-.-C-O-M (ras le bol du spam ! no spam at home !)
Re: [Qemu-devel] about NICs
On Sat, 15 Sep 2007 15:23:57 +0200, Soren Hansen [EMAIL PROTECTED] said: On Fri, Sep 14, 2007 at 09:07:35PM +0200, Sebastien WILLEMIJNS wrote: i noticed ubuntu LiveCD 7.04 QEMU emulation now only works with RTL8139 NICs (because NE2K drivers seems has been deleted from ISO) ne2k-pci is on the Fiesty CD's. Which one did you need? with ubuntu 6.04 emulation under QEMU i hasn't need to include a parameter in the qemu commadline with ubuntu 7.04 emulation under QEMU i must add -net nic,vlan=0,model=rtl8139 -net user,vlan=0,hostname=foo ;)
Re: [Qemu-devel] Re: PATCH, RFC: Generic DMA framework
I made a first implementation of this concept. CPU-bus uses southbound functions, device-CPU northbound ones. The system is not symmetric, the device address range allocation could well be separate. What do you think? Index: qemu/cpu-all.h === --- qemu.orig/cpu-all.h 2007-09-15 15:34:51.0 + +++ qemu/cpu-all.h 2007-09-15 16:05:04.0 + @@ -861,6 +861,54 @@ void dump_exec_info(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...)); +/* Bus operations */ +typedef struct qemu_bus qemu_bus; + +typedef void (*qemu_mem_rw_handler)(void *opaque, +target_phys_addr_t addr, +uint8_t *buf, unsigned int len, +int is_write); + +qemu_bus *bus_init(unsigned int bus_bits, qemu_mem_rw_handler handler, + void *handler_opaque); +void bus_register_physical_memory(qemu_bus *bus, + target_phys_addr_t start_addr, + unsigned long size, + unsigned long phys_offset); +int bus_register_io_memory(qemu_bus *bus, + int io_index, + CPUReadMemoryFunc **mem_read, + CPUWriteMemoryFunc **mem_write, + void *opaque); +/* Direction CPU-bridge-device/memory */ +void bus_rw_south(qemu_bus *bus, target_phys_addr_t addr, uint8_t *buf, + unsigned int len, int is_write); +static inline void bus_read_south(qemu_bus *bus, target_phys_addr_t addr, + uint8_t *buf, unsigned int len) +{ +bus_rw_south(bus, addr, buf, len, 0); +} +static inline void bus_write_south(qemu_bus *bus, target_phys_addr_t addr, + const uint8_t *buf, unsigned int len) +{ +bus_rw_south(bus, addr, (uint8_t *)buf, len, 1); +} +void bus_write_south_rom(qemu_bus *bus, target_phys_addr_t addr, + const uint8_t *buf, unsigned int len); +/* From device towards CPU/memory (DMA) */ +void bus_rw_north(qemu_bus *bus, target_phys_addr_t addr, uint8_t *buf, + unsigned int len, int is_write); +static inline void bus_read_north(qemu_bus *bus, target_phys_addr_t addr, + uint8_t *buf, unsigned int len) +{ +bus_rw_north(bus, addr, buf, len, 0); +} +static inline void bus_write_north(qemu_bus *bus, target_phys_addr_t addr, + const uint8_t *buf, unsigned int len) +{ +bus_rw_north(bus, addr, (uint8_t *)buf, len, 1); +} + /***/ /* host CPU ticks (if available) */ Index: qemu/exec.c === --- qemu.orig/exec.c 2007-09-15 15:34:51.0 + +++ qemu/exec.c 2007-09-15 16:05:54.0 + @@ -2905,3 +2905,258 @@ #undef env #endif + +typedef struct BusPageDesc { +/* offset in host memory of the page + io_index in the low 12 bits */ +target_phys_addr_t phys_offset; +} BusPageDesc; + +struct qemu_bus { +/* Northbound access handler */ +qemu_mem_rw_handler north_handler; +void *handler_opaque; +/* Southbound access management */ +BusPageDesc **l1_bus_map; +unsigned int bus_bits, l1_bits, l2_bits, l1_size, l2_size; +CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][4]; +CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4]; +void *io_mem_opaque[IO_MEM_NB_ENTRIES]; +unsigned int io_mem_nb; +}; + +static BusPageDesc *bus_page_find_alloc(qemu_bus *bus, +target_phys_addr_t index, int alloc) +{ +void **lp, **p; +BusPageDesc *pd; + +p = (void **)bus-l1_bus_map; +#if TARGET_PHYS_ADDR_SPACE_BITS 32 +lp = p + ((index (bus-l1_bits + bus-l2_bits)) (bus-l1_size - 1)); +p = *lp; +if (!p) { +/* allocate if not found */ +if (!alloc) +return NULL; +p = qemu_vmalloc(sizeof(void *) * bus-l1_size); +memset(p, 0, sizeof(void *) * bus-l1_size); +*lp = p; +} +#endif +lp = p + ((index bus-l2_bits) (bus-l1_size - 1)); +pd = *lp; +if (!pd) { +unsigned int i; +/* allocate if not found */ +if (!alloc) +return NULL; +pd = qemu_vmalloc(sizeof(BusPageDesc) * bus-l2_size); +*lp = pd; +for (i = 0; i bus-l2_size; i++) +pd[i].phys_offset = IO_MEM_UNASSIGNED; +} +return ((BusPageDesc *)pd) + (index (bus-l2_size - 1)); +} + +static inline BusPageDesc *bus_page_find(qemu_bus *bus, + target_phys_addr_t index) +{ +return bus_page_find_alloc(bus, index, 0); +} + +int bus_register_io_memory(qemu_bus *bus, + int io_index, +
[Qemu-devel] Re: about NICs
Christian MICHON [EMAIL PROTECTED] writes: Look at the other virtualizers/emulators: Realtek RTL8139 is the standard eth0 for MS VirtualPC 2007 I have not checked Parallels for ages but I believe it was the case too. VMware has pcnet32 (older versions) and e1000 (newer versions) NICs. -- Ben Pfaff http://benpfaff.org
[Qemu-devel] Comment for Solaris fix for the HPTC
Compiling the latest CVS code, I found that a function in vl.c uses a define called ULONG_LONG_MAX. The value is defined in solaris's sys/types.h, but only on _LP64 builds, so 32-bit builds won't pickup if I redefine it as ULONG_MAX. I'm looking for comments on this patch. --- qemu.ORIG/vl.h 2007-08-26 13:46:00.0 -0400 +++ qemu/vl.h 2007-09-15 17:59:24.179299000 -0400 @@ -49,6 +49,12 @@ #define ENOMEDIUM ENODEV #endif +#ifdef __sun__ +/* Have to define this for Solaris as ULONG_LONG_MAX is not defined + anywhere. ULONG_MAX is correct only on _LP64 systems */ +#define ULONG_LONG_MAX 18446744073709551615UL +#endif + #ifdef _WIN32 #include windows.h #define fsync _commit
Re: [Qemu-devel] Comment for Solaris fix for the HPTC
Hi Ben, On Sat, 15 Sep 2007, Ben Taylor wrote: +#ifdef __sun__ +/* Have to define this for Solaris as ULONG_LONG_MAX is not defined + anywhere. ULONG_MAX is correct only on _LP64 systems */ +#define ULONG_LONG_MAX 18446744073709551615UL +#endif + These constants are always defined, right? So why not #ifndef ULONG_LONG_MAX? Ciao, Dscho
[Qemu-devel] qemu disk model
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi list, Does Qemu's disk model handle I/O requests serially? Or can it handle multiple concurrent requests? From reading block.c, it looks like the former, but I wanted to confirm. TIA, Diwaker - -- http://floatingsun.net/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFG7IMYHsqUOPjwXSgRAhoNAKC5LY4/QgpAUEc6M1+C9J+Xbhj1IwCfYNg7 VHpks5kp773/yP9Nb0VUTus= =J33m -END PGP SIGNATURE-