[Qemu-devel] cdrom problem on windows 2003 host
Hi QEMU developers. Thank you for the great product! I've found that it is impossible to pass cdrom device (neither \\.\cdrom0 nor \\.\d: ) to QEMU when it runs on Windows 2003 AS. It always returns "could not open hard disk image " . I tried double backslashes, forwardslashes, drive letter, cdrom0, apostrophies, quotes... may be some problems with identifying blocksize in DeviceIoControl... I' found that DeviceIoControl works slightly differently in W2K3 and W2K. Please check. Meantime I will download sources and try to check too. Cheers, Mark ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] Compile fix for win32
Hi, It is comile fix for win32. Regards, Kazu Index: block-vvfat.c === RCS file: /sources/qemu/qemu/block-vvfat.c,v retrieving revision 1.3 diff -u -r1.3 block-vvfat.c --- block-vvfat.c 18 Dec 2005 18:29:50 - 1.3 +++ block-vvfat.c 19 Dec 2005 06:23:15 - @@ -2351,8 +2351,13 @@ mapping_t* mapping; int j, parent_path_len; +#ifdef _WIN32 +if (mkdir(commit->path)) +return -5; +#else if (mkdir(commit->path, 0755)) return -5; +#endif mapping = insert_mapping(s, commit->param.mkdir.cluster, commit->param.mkdir.cluster + 1); ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu cpu-exec.c
CVSROOT:/sources/qemu Module name:qemu Branch: Changes by: Fabrice Bellard <[EMAIL PROTECTED]> 05/12/19 01:42:33 Modified files: . : cpu-exec.c Log message: workaround for gcc bug on PowerPC CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/cpu-exec.c.diff?tr1=1.71&tr2=1.72&r1=text&r2=text ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] [patch] Poor user-net performance.
Dan mentioned he was seeing very poor network performance when using user-net. It turns out this is because packets were getting dropped (the NIC buffers were full), and the slirp code doesn't throttle properly when this occurs. You end up with a bunch of packets getting sent to the guest, half of which get dropped, then a delay until slirp retransmits. This is much more noticeable on Arm because the NIC only has a small memory buffer. Teaching the slirp code how to do tcp backoff/window scaling is probably a fair amount of work. The easy alternative is to throttle the slirp output when we know the card's buffers are full. slirp has a convenient hook for this, so it's a matter of adding the hooks to the hardware emulation. This increases arm user-net performance from painfully slow (~200kbit) to guest CPU bound (~20Mbit). Paul Index: vl.c === RCS file: /sources/qemu/qemu/vl.c,v retrieving revision 1.157 diff -u -p -r1.157 vl.c --- vl.c 18 Dec 2005 20:34:32 - 1.157 +++ vl.c 18 Dec 2005 23:12:02 - @@ -1768,13 +1768,16 @@ VLANState *qemu_find_vlan(int id) } VLANClientState *qemu_new_vlan_client(VLANState *vlan, - IOReadHandler *fd_read, void *opaque) + IOReadHandler *fd_read, + IOCanRWHandler *fd_can_read, + void *opaque) { VLANClientState *vc, **pvc; vc = qemu_mallocz(sizeof(VLANClientState)); if (!vc) return NULL; vc->fd_read = fd_read; +vc->fd_can_read = fd_can_read; vc->opaque = opaque; vc->vlan = vlan; @@ -1786,6 +1789,20 @@ VLANClientState *qemu_new_vlan_client(VL return vc; } +int qemu_can_send_packet(VLANClientState *vc1) +{ +VLANState *vlan = vc1->vlan; +VLANClientState *vc; + +for(vc = vlan->first_client; vc != NULL; vc = vc->next) { +if (vc != vc1) { +if (vc->fd_can_read && !vc->fd_can_read(vc->opaque)) +return 0; +} +} +return 1; +} + void qemu_send_packet(VLANClientState *vc1, const uint8_t *buf, int size) { VLANState *vlan = vc1->vlan; @@ -1811,7 +1828,7 @@ static VLANClientState *slirp_vc; int slirp_can_output(void) { -return 1; +qemu_can_send_packet(slirp_vc); } void slirp_output(const uint8_t *pkt, int pkt_len) @@ -1839,7 +1856,7 @@ static int net_slirp_init(VLANState *vla slirp_init(); } slirp_vc = qemu_new_vlan_client(vlan, -slirp_receive, NULL); +slirp_receive, NULL, NULL); snprintf(slirp_vc->info_str, sizeof(slirp_vc->info_str), "user redirector"); return 0; } @@ -2024,7 +2041,7 @@ static TAPState *net_tap_fd_init(VLANSta if (!s) return NULL; s->fd = fd; -s->vc = qemu_new_vlan_client(vlan, tap_receive, s); +s->vc = qemu_new_vlan_client(vlan, tap_receive, NULL, s); qemu_set_fd_handler(s->fd, tap_send, NULL, s); snprintf(s->vc->info_str, sizeof(s->vc->info_str), "tap: fd=%d", fd); return s; @@ -2327,7 +2344,7 @@ static NetSocketState *net_socket_fd_ini return NULL; s->fd = fd; -s->vc = qemu_new_vlan_client(vlan, net_socket_receive_dgram, s); +s->vc = qemu_new_vlan_client(vlan, net_socket_receive_dgram, NULL, s); qemu_set_fd_handler(s->fd, net_socket_send_dgram, NULL, s); /* mcast: save bound address as dst */ @@ -2355,7 +2372,7 @@ static NetSocketState *net_socket_fd_ini return NULL; s->fd = fd; s->vc = qemu_new_vlan_client(vlan, - net_socket_receive, s); + net_socket_receive, NULL, s); snprintf(s->vc->info_str, sizeof(s->vc->info_str), "socket: fd=%d", fd); if (is_connected) { Index: vl.h === RCS file: /sources/qemu/qemu/vl.h,v retrieving revision 1.99 diff -u -p -r1.99 vl.h --- vl.h 18 Dec 2005 20:34:32 - 1.99 +++ vl.h 18 Dec 2005 23:12:03 - @@ -279,6 +279,9 @@ typedef struct VLANClientState VLANClien struct VLANClientState { IOReadHandler *fd_read; +/* Packets may still be sent if this returns zero. It's used to + rate-limit the slirp code. */ +IOCanRWHandler *fd_can_read; void *opaque; struct VLANClientState *next; struct VLANState *vlan; @@ -293,8 +296,12 @@ typedef struct VLANState { VLANState *qemu_find_vlan(int id); VLANClientState *qemu_new_vlan_client(VLANState *vlan, - IOReadHandler *fd_read, void *opaque); + IOReadHandler *fd_read, + IOCanRWHandler *fd_can_read, + void *opaque); +int qemu_can_send_packet(VLANClientState *vc); void qemu_send_packet(VLANClientState
[Qemu-devel] ARM page crossing inside insn? (Re: ARM ethernet fixes)
Antti P Miettinen <[EMAIL PROTECTED]> writes: > Looks like the kernel somehow ends up thinking that we are loading > something from zero. Hmm.. the value being loaded to r1 is zero. So > could this be related to crossing a page boundary in the middle of an > instruction? But anyway - I'll try to debug this further.. Looks like it might be the page crossing. The below little program is a bit smaller test case. Without args, no segfault, with arg it segfaults (inside ARM sysemu - at least for me): #include #include long buf[8192/4]; int main(int ac, char **av) { unsigned long base = (unsigned long)(void *)(buf + 4096/4); unsigned long dummy; if (ac > 1) { base &= ~0xfff; base -= 4; } printf("buf: %p, base: 0x%08lx, dummy: 0x%08lx\n", buf, base, dummy); __asm__ __volatile__ ("ldmia %0,{%1,%2}" : "=r" (base) : "0" (base), "r" (dummy)); printf("base: 0x%08lx, dummy: 0x%08lx\n", base, dummy); return 0; } -- http://www.iki.fi/~ananaza/ ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] Re: ARM ethernet fixes
Daniel Jacobowitz <[EMAIL PROTECTED]> writes: > It appears to work fairly well. I can confirm that. I'm currently debugging a segmentation fault in compiling one source file of firefox. Something that the current ARM sysemu can do is e.g. - boot debian/sid NFS root - compile gcc far enough to produce a cc1plus with debug info - run gdb inside emacs to debug cc1plus compiling a ff source file - run cc1plus under gdb with a breakpoint with ignorecount - be debugged with arm-linux-gdb IMHO, thats quite impressive :-) Might as well describe the thing I'm trying to debug. Dunno what the exact problem is but it is repeatable. The complete test case is a bit large, but the segfaulting code qestion looks like: (gdb) disas $pc-16 $pc+16 Dump of assembler code from 0x31bdac to 0x31bdcc: 0x0031bdac : ldr r1, [r2, #28] 0x0031bdb0 : add r3, r3, r1 0x0031bdb4 : str r3, [r4, #8] 0x0031bdb8 : add r1, r4, #12 ; 0xc 0x0031bdbc : ldmia r1, {r1, lr} 0x0031bdc0 : ldr r3, [r0, #16] 0x0031bdc4 : ldr r2, [r3, #32] 0x0031bdc8 : add r1, r1, r2 End of assembler dump. And the registers before SIGSEGV look like: (gdb) info reg r0 0x58ff48 5832520 r1 0x4205effc 1107685372 r2 0x41fc7320 1107063584 r3 0x0 0 r4 0x4205eff0 1107685360 r5 0x29e670 r6 0x42059008 1107660808 r7 0x5d0ab0 6097584 r8 0x3ba8ea 3909866 r9 0x43d9e8 4446696 r100x1 1 r110x3ecd20 4115744 r120xc 12 sp 0xbef3b234 -1091325388 lr 0x2 2 pc 0x31bdbc 3259836 fps0x100101016781328 cpsr 0x10 16 So it looks like we are about to load a couple of longs from 0x4205effc. But when I step: (gdb) si Program received signal SIGSEGV, Segmentation fault. 0x0031bdbc in global_alloc (file=0x0) at ../../src/gcc/global.c:490 Looks like the kernel somehow ends up thinking that we are loading something from zero. Hmm.. the value being loaded to r1 is zero. So could this be related to crossing a page boundary in the middle of an instruction? But anyway - I'll try to debug this further.. -- http://www.iki.fi/~ananaza/ ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu ./qemu-doc.texi ./vl.c ./vl.h hw/pc.c
CVSROOT:/sources/qemu Module name:qemu Branch: Changes by: Fabrice Bellard <[EMAIL PROTECTED]> 05/12/18 20:34:32 Modified files: . : qemu-doc.texi vl.c vl.h hw : pc.c Log message: suppressed -enable-audio and simplified -soundhw option handling (malc) CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/qemu-doc.texi.diff?tr1=1.76&tr2=1.77&r1=text&r2=text http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/vl.c.diff?tr1=1.156&tr2=1.157&r1=text&r2=text http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/vl.h.diff?tr1=1.98&tr2=1.99&r1=text&r2=text http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/hw/pc.c.diff?tr1=1.49&tr2=1.50&r1=text&r2=text ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] ARM ethernet fixes
In message: <[EMAIL PROTECTED]> Paul Brook <[EMAIL PROTECTED]> writes: : > Given all these improvements in arm support, what's the status of : > system level support for arm, and what system is emulated? : : Short answer is it should work. A default linux kernel config doesn't quite : work because it hangs probing for a non-existant VGA card. Disable the VGA : console driver and it's fine. : : It emulates most of an Arm Integrator/CP board with an arm1026E cpu. : Available peripherals are two UARTs, and a NIC. More than enough to boot : linux :-) Well, I'm hoping to boot FreeBSD/arm on the thing. two uarts and a nic is more than enough to boot FreeBSD as well :-) : > You don't need device emulation to do userland stuf... : : No, but it's a diskless board. You either run everything off an initrd, or you : need network. That's good to know. Warner ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu qemu-doc.texi
CVSROOT:/sources/qemu Module name:qemu Branch: Changes by: Fabrice Bellard <[EMAIL PROTECTED]> 05/12/18 20:11:37 Modified files: . : qemu-doc.texi Log message: MIPS, ARM and SMP updates CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/qemu-doc.texi.diff?tr1=1.75&tr2=1.76&r1=text&r2=text ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu/linux-user syscall.c
CVSROOT:/sources/qemu Module name:qemu Branch: Changes by: Fabrice Bellard <[EMAIL PROTECTED]> 05/12/18 20:03:27 Modified files: linux-user : syscall.c Log message: log typos CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/linux-user/syscall.c.diff?tr1=1.64&tr2=1.65&r1=text&r2=text ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu/tests qruncom.c Makefile
CVSROOT:/sources/qemu Module name:qemu Branch: Changes by: Fabrice Bellard <[EMAIL PROTECTED]> 05/12/18 19:28:08 Modified files: tests : qruncom.c Makefile Log message: qruncom compile fixes (initial patch by Even Rouault) CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/tests/qruncom.c.diff?tr1=1.3&tr2=1.4&r1=text&r2=text http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/tests/Makefile.diff?tr1=1.35&tr2=1.36&r1=text&r2=text ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu cocoa.m
CVSROOT:/sources/qemu Module name:qemu Branch: Changes by: Fabrice Bellard <[EMAIL PROTECTED]> 05/12/18 19:18:45 Modified files: . : cocoa.m Log message: (Joachim Henke) - suppress unwanted kernel logs - avoids passing modifier keys to the guest OS when typing in the Monitor - fixes the bug that the mouse cursor grab is released with _any_ modifier key (should be only ctrl+alt) - removes some code redundancies CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/cocoa.m.diff?tr1=1.5&tr2=1.6&r1=text&r2=text ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu configure
CVSROOT:/sources/qemu Module name:qemu Branch: Changes by: Fabrice Bellard <[EMAIL PROTECTED]> 05/12/18 19:14:49 Modified files: . : configure Log message: better help option support (Bernhard Fischer) CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/configure.diff?tr1=1.78&tr2=1.79&r1=text&r2=text ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu vl.c
CVSROOT:/sources/qemu Module name:qemu Branch: Changes by: Fabrice Bellard <[EMAIL PROTECTED]> 05/12/18 19:09:37 Modified files: . : vl.c Log message: avoid echo on pty devices (David Decotigny) - fixes in the command line help CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/vl.c.diff?tr1=1.155&tr2=1.156&r1=text&r2=text ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] ARM ethernet fixes
On Sunday 18 December 2005 12:54, Daniel Jacobowitz wrote: > Emulation of something with PCI and an IDE controller is pretty > high up on my list : Does qemu do StrongARM emulations? There is a nice StrongARM PCI motherboard from CATS with IDE controllers, etc. -- Lose, v., experience a loss, get rid of, "lose the weight" Loose, adj., not tight, let go, free, "loose clothing" ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu Changelog qemu-doc.texi
CVSROOT:/sources/qemu Module name:qemu Branch: Changes by: Fabrice Bellard <[EMAIL PROTECTED]> 05/12/18 18:31:45 Modified files: . : Changelog qemu-doc.texi Log message: update CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/Changelog.diff?tr1=1.108&tr2=1.109&r1=text&r2=text http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/qemu-doc.texi.diff?tr1=1.74&tr2=1.75&r1=text&r2=text ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu block-vvfat.c
CVSROOT:/sources/qemu Module name:qemu Branch: Changes by: Fabrice Bellard <[EMAIL PROTECTED]> 05/12/18 18:29:50 Modified files: . : block-vvfat.c Log message: Major overhaul of the virtual FAT driver for read/write support (Johannes Schindelin) CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/block-vvfat.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu block-qcow.c block.c block_int.h
CVSROOT:/sources/qemu Module name:qemu Branch: Changes by: Fabrice Bellard <[EMAIL PROTECTED]> 05/12/18 18:28:15 Modified files: . : block-qcow.c block.c block_int.h Log message: qcow_make_empty() support (Johannes Schindelin) CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/block-qcow.c.diff?tr1=1.5&tr2=1.6&r1=text&r2=text http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/block.c.diff?tr1=1.24&tr2=1.25&r1=text&r2=text http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/block_int.h.diff?tr1=1.3&tr2=1.4&r1=text&r2=text ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] ARM ethernet fixes
In message: <[EMAIL PROTECTED]> Daniel Jacobowitz <[EMAIL PROTECTED]> writes: : On Sun, Dec 18, 2005 at 04:51:02PM +, Paul Brook wrote: : > Something like the attached patch. : : After getting myself, and probably Paul, completely confused about : array indexing, I agree that this version is right :-) It also boots : and appears to work. Network performance is not very good (averaging : about 10K/s - 30K/s most of the time, but occasionally spiking higher), : but there may be something we can do about that later. Thanks. Given all these improvements in arm support, what's the status of system level support for arm, and what system is emulated? You don't need device emulation to do userland stuf... Warner ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu vl.c
CVSROOT:/sources/qemu Module name:qemu Branch: Changes by: Fabrice Bellard <[EMAIL PROTECTED]> 05/12/18 18:02:24 Modified files: . : vl.c Log message: use IPPROTO_IP instead of SOL_IP CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/vl.c.diff?tr1=1.154&tr2=1.155&r1=text&r2=text ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] ARM ethernet fixes
On Sun, Dec 18, 2005 at 10:42:16AM -0700, M. Warner Losh wrote: > In message: <[EMAIL PROTECTED]> > Daniel Jacobowitz <[EMAIL PROTECTED]> writes: > : On Sun, Dec 18, 2005 at 04:51:02PM +, Paul Brook wrote: > : > Something like the attached patch. > : > : After getting myself, and probably Paul, completely confused about > : array indexing, I agree that this version is right :-) It also boots > : and appears to work. Network performance is not very good (averaging > : about 10K/s - 30K/s most of the time, but occasionally spiking higher), > : but there may be something we can do about that later. Thanks. > > Given all these improvements in arm support, what's the status of > system level support for arm, and what system is emulated? You don't > need device emulation to do userland stuf... It's an Integrator/CP. It has a network card and a serial port, and that's about it - NFS root works, now that the network card's been fixed. I use some "fake hard drive" patches inspired by Paul, and I'll post them if anyone really, really wants to see them, but they're hideous. Emulation of something with PCI and an IDE controller is pretty high up on my list :-) It appears to work fairly well. I was able to run debian-installer in it with only a few glitches (d-i does not like systems without hard drives!). -- Daniel Jacobowitz CodeSourcery, LLC ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] ARM ethernet fixes
> Given all these improvements in arm support, what's the status of > system level support for arm, and what system is emulated? Short answer is it should work. A default linux kernel config doesn't quite work because it hangs probing for a non-existant VGA card. Disable the VGA console driver and it's fine. It emulates most of an Arm Integrator/CP board with an arm1026E cpu. Available peripherals are two UARTs, and a NIC. More than enough to boot linux :-) > You don't need device emulation to do userland stuf... No, but it's a diskless board. You either run everything off an initrd, or you need network. Paul ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu/hw mips_r4k.c
CVSROOT:/sources/qemu Module name:qemu Branch: Changes by: Fabrice Bellard <[EMAIL PROTECTED]> 05/12/18 17:51:01 Modified files: hw : mips_r4k.c Log message: do not init ne2000 if no network enabled CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/hw/mips_r4k.c.diff?tr1=1.12&tr2=1.13&r1=text&r2=text ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu/hw smc91c111.c
CVSROOT:/sources/qemu Module name:qemu Branch: Changes by: Fabrice Bellard <[EMAIL PROTECTED]> 05/12/18 17:39:52 Modified files: hw : smc91c111.c Log message: smc91c111 fixes (Paul Brook) CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/hw/smc91c111.c.diff?tr1=1.1&tr2=1.2&r1=text&r2=text ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] ARM ethernet fixes
On Sun, Dec 18, 2005 at 04:51:02PM +, Paul Brook wrote: > Something like the attached patch. After getting myself, and probably Paul, completely confused about array indexing, I agree that this version is right :-) It also boots and appears to work. Network performance is not very good (averaging about 10K/s - 30K/s most of the time, but occasionally spiking higher), but there may be something we can do about that later. Thanks. -- Daniel Jacobowitz CodeSourcery, LLC ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu/target-arm translate.c
CVSROOT:/sources/qemu Module name:qemu Branch: Changes by: Fabrice Bellard <[EMAIL PROTECTED]> 05/12/18 16:55:25 Modified files: target-arm : translate.c Log message: cpu_reset() fix (Paul Brook) CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/target-arm/translate.c.diff?tr1=1.34&tr2=1.35&r1=text&r2=text ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu/target-arm helper.c
CVSROOT:/sources/qemu Module name:qemu Branch: Changes by: Fabrice Bellard <[EMAIL PROTECTED]> 05/12/18 16:54:08 Modified files: target-arm : helper.c Log message: switching to Arm mode in do_interrupt() (Paul Brook) CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/target-arm/helper.c.diff?tr1=1.1&tr2=1.2&r1=text&r2=text ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] ARM ethernet fixes
On Thursday 15 December 2005 00:00, Paul Brook wrote: > On Wednesday 14 December 2005 22:17, Daniel Jacobowitz wrote: > > This is enough to let me use apt-get within qemu-system-arm :-) > > I'd totally missed that there were _two_ TX FIFOs. > > > @@ -364,6 +381,8 @@ static void smc91c111_writeb(void *opaqu > > return; > > case 12: /* Interrupt ACK. */ > > s->int_level &= ~(value & 0xd6); > > +if (value & INT_TX) > > +smc91c111_pop_tx_fifo_done(s); > > smc91c111_update(s); > > return; > > I'm fairly sure this is still wrong. We should only clear INT_TX if the tx > completion fifo is empty. Maybe have smc91c111_update set the INT_TX bit if > tx_fifo_done_len != 0. > > You also need to make smc91c111_reset, smc91c111_writeb: bank 2 offset 0 > cmd 2 (Reset MMU) and smc91c111_writeb: bank 2 offset 0 cmd 7 (Reset TX > FIFO) set s->tx_fifo_done_len = 0. Something like the attached patch. Paul === hw/smc91c111.c == --- hw/smc91c111.c (revision 1912) +++ hw/smc91c111.c (local) @@ -35,8 +35,10 @@ int tx_fifo[NUM_PACKETS]; int rx_fifo_len; int rx_fifo[NUM_PACKETS]; +int tx_fifo_done_len; +int tx_fifo_done[NUM_PACKETS]; /* Packet buffer memory. */ -uint8_t data[2048][NUM_PACKETS]; +uint8_t data[NUM_PACKETS][2048]; uint8_t int_level; uint8_t int_mask; uint8_t macaddr[6]; @@ -81,6 +83,8 @@ if (s->tx_fifo_len == 0) s->int_level |= INT_TX_EMPTY; +if (s->tx_fifo_done_len != 0) +s->int_level |= INT_TX; level = (s->int_level & s->int_mask) != 0; pic_set_irq_new(s->pic, s->irq, level); } @@ -128,6 +132,18 @@ smc91c111_update(s); } +/* Remove an item from the TX completion FIFO. */ +static void smc91c111_pop_tx_fifo_done(smc91c111_state *s) +{ +int i; + +if (s->tx_fifo_done_len == 0) +return; +s->tx_fifo_done_len--; +for (i = 0; i < s->tx_fifo_done_len; i++) +s->tx_fifo_done[i] = s->tx_fifo_done[i + 1]; +} + /* Release the memory allocated to a packet. */ static void smc91c111_release_packet(smc91c111_state *s, int packet) { @@ -184,12 +200,13 @@ add_crc = 0; #endif if (s->ctr & CTR_AUTO_RELEASE) +/* Race? */ smc91c111_release_packet(s, packetnum); +else if (s->tx_fifo_done_len < NUM_PACKETS) +s->tx_fifo_done[s->tx_fifo_done_len++] = packetnum; qemu_send_packet(s->vc, p, len); } s->tx_fifo_len = 0; -if ((s->ctr & CTR_AUTO_RELEASE) == 0) -s->int_level |= INT_TX; smc91c111_update(s); } @@ -206,6 +223,7 @@ { s->bank = 0; s->tx_fifo_len = 0; +s->tx_fifo_done_len = 0; s->rx_fifo_len = 0; s->allocated = 0; s->packet_num = 0; @@ -306,6 +324,7 @@ case 2: /* Reset MMU. */ s->allocated = 0; s->tx_fifo_len = 0; +s->tx_fifo_done_len = 0; s->rx_fifo_len = 0; s->tx_alloc = 0; break; @@ -326,6 +345,7 @@ break; case 7: /* Reset TX FIFO. */ s->tx_fifo_len = 0; +s->tx_fifo_done_len = 0; break; } return; @@ -364,6 +384,8 @@ return; case 12: /* Interrupt ACK. */ s->int_level &= ~(value & 0xd6); +if (value & INT_TX) +smc91c111_pop_tx_fifo_done(s); smc91c111_update(s); return; case 13: /* Interrupt mask. */ @@ -473,10 +495,10 @@ case 3: /* Allocation Result. */ return s->tx_alloc; case 4: /* TX FIFO */ -if (s->tx_fifo_len == 0) +if (s->tx_fifo_done_len == 0) return 0x80; else -return s->tx_fifo[0]; +return s->tx_fifo_done[0]; case 5: /* RX FIFO */ if (s->rx_fifo_len == 0) return 0x80; ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu qemu-doc.texi vl.c
CVSROOT:/sources/qemu Module name:qemu Branch: Changes by: Fabrice Bellard <[EMAIL PROTECTED]> 05/12/18 16:36:49 Modified files: . : qemu-doc.texi vl.c Log message: '-net socket,mcast=' option support (initial patch by Juan Jose Ciarlante) CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/qemu-doc.texi.diff?tr1=1.73&tr2=1.74&r1=text&r2=text http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/vl.c.diff?tr1=1.153&tr2=1.154&r1=text&r2=text ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel