From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56824 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Px290-0007lH-ON for qemu-devel@nongnu.org; Tue, 08 Mar 2011 14:00:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Px28x-0007Ch-R4 for qemu-devel@nongnu.org; Tue, 08 Mar 2011 14:00:28 -0500 Received: from mail-yw0-f45.google.com ([209.85.213.45]:58136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Px28x-0007CX-Of for qemu-devel@nongnu.org; Tue, 08 Mar 2011 14:00:27 -0500 Received: by ywl41 with SMTP id 41so2620009ywl.4 for ; Tue, 08 Mar 2011 11:00:27 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 8 Mar 2011 19:00:27 +0000 Message-ID: Subject: Re: [Qemu-devel] how to convert guest virtual address to host virtual address in QEMU? From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gunasekaran Dharman Cc: qemu-devel@nongnu.org On Tue, Mar 8, 2011 at 5:30 PM, Gunasekaran Dharman wrote: > From guest application, Iam passing some virtual addresses to QEMU through > device I/O operation. Now I want to convert these guest virtual addresses to > host virtual addresses so that I can perform some operation using them. In > QEMU, is there any macro or function available to convert guest virtual > address to host virtual address? > My objective is to perform guest's memcpy operation in host so that it will > be faster. That's not really possible. On architectures with a software-managed TLB you don't know the layout of the virtual memory structures (because they are defined in software and not standardized). I suggest learning about and optimizing TCG instead of inventing a memcpy device because it can benefit all code and does not require a custom device and guest drivers. Stefan