From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rs89D-0008JE-On for qemu-devel@nongnu.org; Tue, 31 Jan 2012 02:29:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rs89B-00037Y-JV for qemu-devel@nongnu.org; Tue, 31 Jan 2012 02:28:59 -0500 Received: from csmailer.cs.nctu.edu.tw ([140.113.235.130]:60847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rs89A-00037K-Tc for qemu-devel@nongnu.org; Tue, 31 Jan 2012 02:28:57 -0500 Date: Tue, 31 Jan 2012 15:28:52 +0800 From: =?utf-8?B?6Zmz6Z+L5Lu7?= Message-ID: <20120131072852.GA32162@cs.nctu.edu.tw> References: <20120120082330.GA83580@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] nested page table translation for non-x86 operating system List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Xin Tong Cc: qemu-devel , =?utf-8?B?6Zmz6Z+L5Lu7?= On Fri, Jan 20, 2012 at 08:54:12AM -0500, Xin Tong wrote: > On Fri, Jan 20, 2012 at 3:23 AM, =E9=99=B3=E9=9F=8B=E4=BB=BB wrote: > >> 1. The control of gCR3 and hCR3 needs kernel access. While they can > >> be set with a device module as what is done in kvm. Trapping into th= e > >> kernel every time gCR3 is reseted might be too expensive. > > > > Why the control of gCR3 needs kernel access? Isn't gCR3 just a field= of the > > CPUX86State? QEMU should have the control of it. Or you mean the trap= ping thing? >=20 > I do not think gCR3 is a field in the CPUx86State. I think inorder to > change the guest CR3, we need to trap into the kernel as kvm does. If your scenario is pure QEMU (without kvm), I think gCR3 is a field in= the CPUx86State. See below, typedef struct CPUX86State { ... target_ulong cr[5]; /* NOTE: cr1 is unused */ ... }; Or I misunderstand what you're trying to do? 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 Homepage: http://people.cs.nctu.edu.tw/~chenwj