From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GsdLh-0007HW-Bt for qemu-devel@nongnu.org; Fri, 08 Dec 2006 05:53:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GsdLg-0007GG-8X for qemu-devel@nongnu.org; Fri, 08 Dec 2006 05:53:00 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GsdLg-0007G5-2m for qemu-devel@nongnu.org; Fri, 08 Dec 2006 05:53:00 -0500 Received: from [81.255.54.11] (helo=mx.laposte.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GsdLg-0003Kd-3m for qemu-devel@nongnu.org; Fri, 08 Dec 2006 05:53:00 -0500 Received: from smtp.laposte.net (10.150.9.35) by mx.laposte.net (7.2.060.1) id 45533E5601829653 for qemu-devel@nongnu.org; Fri, 8 Dec 2006 11:52:58 +0100 Received: from smtpin.laposte.net (10.150.9.74) by smtp.laposte.net (7.3.105.2) id 45654BF20154F03B for qemu-devel@nongnu.org; Fri, 8 Dec 2006 11:52:51 +0100 Received: from bibi (217.128.241.130) by smtpin.laposte.net (7.2.060.1) (authenticated as jerome.arbez-gindre) id 4575D96D00015200 for qemu-devel@nongnu.org; Fri, 8 Dec 2006 11:52:51 +0100 Subject: [Qemu-devel] need advice on PCI board emulation From: jerome Arbez-Gindre Content-Type: text/plain; charset=ISO-8859-1 Date: Fri, 08 Dec 2006 11:52:50 +0100 Message-Id: <1165575170.22384.16.camel@bibi> Mime-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi, I'm working on a modem PCI board emulation inside Qemu.=20 My emulation is neerly functionnaly complete, but I have some doubt on my technical choices : - to emulate dma transfers, I launch one thread for each dma channel. - to emulate posponed starting behaviors (board self tests), I launch a thread with a sleep and then board status changes. - to emulate demodulated incoming data, I launch one thread waiting with blocking reads on a UDP socket. Because I had some toubles (segfaults in tb_reset_jump_recursive2 (exec.c)), I have serilized my calls to pci_set_irq with the help of a new thread. So, my question is : Is it reasonable to use threads to emulate parallel behaviors ? if Yes : How could I make my calls to Qemu APIs more robust ? If No : What is the *Good* way ? Thanks J=E9r=F4me