Received: from eggs.gnu.org ([208.118.235.92]:55528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEeZR-00076h-CU for qemu-devel@nongnu.org; Mon, 02 Apr 2012 06:33:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEeZM-0007mp-K2 for qemu-devel@nongnu.org; Mon, 02 Apr 2012 06:33:08 -0400 Received: from fe01x03-cgp.akado.ru ([77.232.31.164]:60220 helo=akado.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEeZM-0007mg-Cv for qemu-devel@nongnu.org; Mon, 02 Apr 2012 06:33:04 -0400 Date: Mon, 2 Apr 2012 14:32:52 +0400 (MSK) From: malc In-Reply-To: <20120402102123.GA81576@cs.nctu.edu.tw> Message-ID: References: <20120402034542.GA59901@cs.nctu.edu.tw> <20120402102123.GA81576@cs.nctu.edu.tw> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [Qemu-devel] Why we need unlink tb when cpu_interrupt/cpu_exit get called? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-2022-JP?Q?=1B$BDDpjG$=1B=28J?= Cc: qemu-devel@nongnu.org On Mon, 2 Apr 2012, ??? wrote: > > Try following with and without tb unlinking on aforementioned image to > > feel the difference: > > > > sh-2.05b# echo "char main[]={0xeb,-2};" >h.c > > sh-2.05b# tcc -run h.c > > I think the example you gave me is an infinite loop, right? O.K., here is > what I got. Yes, it's "0: jmp 0b" > > Case 1. With tb unlinking > - tcc runs infinitely and I can not stop it by using Ctrl + C. But I can use > Ctrl + C to kill QEMU itself. You can also interactw with monitor and whatnot, IOW I/O loops is running, IEYOW QEMU is not 100% occupied with running the guest code, since it can unlink the TB and do other work. > > Case 2. Without tb unlinking (I comment out the function body of cpu_unlink_tb) > - tcc runs infinitely and without any responding. In case 1, the guest OS can > respond to my keyboard. Besides, Ctrl + C can not terminate QEMU, I have to > use `kill` to stop it. > > Is this what you expect? Yes. -- mailto:av1474@comtv.ru