From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LQRr1-0002Kc-Bb for qemu-devel@nongnu.org; Fri, 23 Jan 2009 14:38:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LQRr0-0002Ja-Rk for qemu-devel@nongnu.org; Fri, 23 Jan 2009 14:38:10 -0500 Received: from [199.232.76.173] (port=50581 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQRr0-0002JG-IL for qemu-devel@nongnu.org; Fri, 23 Jan 2009 14:38:10 -0500 Received: from mail-qy0-f20.google.com ([209.85.221.20]:42877) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LQRr0-0006ga-7l for qemu-devel@nongnu.org; Fri, 23 Jan 2009 14:38:10 -0500 Received: by qyk13 with SMTP id 13so7706102qyk.10 for ; Fri, 23 Jan 2009 11:38:09 -0800 (PST) Message-ID: <497A1C91.3080601@codemonkey.ws> Date: Fri, 23 Jan 2009 13:37:53 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [6391] Fix nographic mode and VNC References: <200901220423.23551.paul@codesourcery.com> <497890ED.6000109@codemonkey.ws> <200901231820.32999.paul@codesourcery.com> In-Reply-To: <200901231820.32999.paul@codesourcery.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: Blue Swirl , qemu-devel@nongnu.org Paul Brook wrote: >>>> A second solution is to use a polling select() in cpu_exec. Since >>>> you're adding a system call (and a rather heavy one) in the fast path, >>>> this is going to likely hurt TCG performance. >>>> >>> This won't work. If the guest really is in a tight loop then TB chaining >>> means it will never exit translated code. >>> >> But then signal delivery wouldn't either, right? That suggests that if >> the guest is in a tight loop right now, QEMU will freeze. >> > > No. The signal handler calls cpu_interrupt, which unlinks the TBs. > Which isn't thread safe. Okay, then you also need to send a signal to the TCG thread. Regards, Anthony Liguori >> There's a fair bit of code that is safe to run along side of TCG. If we >> separate the locking for the device model code from every thing (the >> monitor, vnc, sdl, etc.), then we could still let QEMU be responsive >> even in such a condition. >> > > Maybe. You risk having to put an SMP safe lock in the MMIO handler, which > would probably do bad things to performance. Many of the embedded targets > don't have DMA capable peripherals, so we want to avoid making MMIO too > expensive. kvm is a bit different because MMIO is already horribly expensive. > > Paul >