From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DV7z0-0000k6-Ce for qemu-devel@nongnu.org; Mon, 09 May 2005 09:07:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DV7yz-0000jo-Tv for qemu-devel@nongnu.org; Mon, 09 May 2005 09:07:38 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DV7yp-0000KY-Jn for qemu-devel@nongnu.org; Mon, 09 May 2005 09:07:27 -0400 Received: from [65.74.133.9] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DV7dP-0003fx-9s for qemu-devel@nongnu.org; Mon, 09 May 2005 08:45:20 -0400 From: Paul Brook Subject: Re: [Qemu-devel] QVM86, SKAS.. many modules, one vision? Date: Mon, 9 May 2005 13:39:02 +0100 References: <427F28CF.1030300@manchester.ac.uk> In-Reply-To: <427F28CF.1030300@manchester.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200505091339.03936.paul@codesourcery.com> 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 Cc: Ian Rogers On Monday 09 May 2005 10:09, Ian Rogers wrote: > Hi, > > I recently spent some effort working out what Separate Kernel Address > Space (SKAS) did for user-mode-linux (UML). The results of this keen be > seen here: > > http://news.gmane.org/group/gmane.linux.uml.devel/last=/force_load=t > on the thread "Using SKAS, any examples?" > > the conclusion to this is that with SKAS you can create separate address > spaces and map pages (possibly shared) into them. You can then use > ptrace to control the execution of something in that separate address > space. > > This is all well and good, but when emulating one instruction set on > another the executing code needs to peek and poke the separate address > space. With SKAS this can only be done by using a page with a shared > mapping, or by executing some host machine code in the separate address > space. > > What would be good is if multi-segments could be enabled and then > cs/ds/es could be used by the emulator and fs/gs could map to higher in > the linear address space and onto the separate address spaces. These > address spaces would then be addressable with just a segment over-ride. > > It seems these goals are likely in part to be shared by qvm86 and kqemu. > Is it worth working toward a unified Linux module specifically for > emulation? IIUC SKAS doesn't give you access to the full address space. It just creates a new process, giving you a "clean" linux userspace. For full system emulation this isn't sufficient, you need to full address space. For user-mode emulation the largest chunk of address space is the translated code buffer. This needs to be able to directly address the guest memory space, so sharing a VM with the host qemu process isn't really a problem. We just map the host qemu out of the way somewhere. This is different from native UML where with SKAS you can run applications without any foreign areas mapped into the guest address space. Paul