From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6vHW-0007i6-Hm for qemu-devel@nongnu.org; Thu, 22 Sep 2011 22:14:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R6vHU-0004Uz-9y for qemu-devel@nongnu.org; Thu, 22 Sep 2011 22:14:26 -0400 Received: from csmailer.cs.nctu.edu.tw ([140.113.235.130]:61793) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6vHT-0004Uf-E7 for qemu-devel@nongnu.org; Thu, 22 Sep 2011 22:14:24 -0400 Date: Fri, 23 Sep 2011 10:14:11 +0800 From: =?utf-8?B?6Zmz6Z+L5Lu7?= Message-ID: <20110923021411.GA2359@cs.nctu.edu.tw> References: <4E7A9153.9030905@linux.vnet.ibm.com> <20110922015833.GA11618@cs.nctu.edu.tw> <4E7A9D2E.20402@linux.vnet.ibm.com> <20110922023611.GA14886@cs.nctu.edu.tw> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] TB chaining List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Xin Tong Cc: Lei Li , =?utf-8?B?6Zmz6Z+L5Lu7?= , qemu-devel > if direct chaining is used, am I right to think that jmp_next and jmp_f= irst > will not be used ? You have to know that when we say "TB", it might means different things according to the context. QEMU use struct TranslationBlock to record some information about TB in the code cache. Take direct block chaining for example, when I say we direct link tb1 to tb2, i.e., tb1 -> tb2, that actually means two things. First, we patch the branch target of tb1 (in the code cache) so that tb1 can jump to tb2 (in the code cache) and executed. Meanwhile, we need to update tb1 (struct TranslationBlock) and tb2 (struct TranslationBlock) to reflect the fact that tb1 (in the code cache) is linked to tb2 (in the code cache). jmp_next and jmp_first are fields of struct TranslationBlock, we use them when we need to unchian TBs (in the code cache). Regards, chenwj --=20 Wei-Ren Chen (=E9=99=B3=E9=9F=8B=E4=BB=BB) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667