From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=59867 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxZXS-0003hD-UY for qemu-devel@nongnu.org; Thu, 10 Mar 2011 01:40:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxZXR-0004w5-OD for qemu-devel@nongnu.org; Thu, 10 Mar 2011 01:39:58 -0500 Received: from mail-qw0-f45.google.com ([209.85.216.45]:32903) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxZXR-0004w1-KP for qemu-devel@nongnu.org; Thu, 10 Mar 2011 01:39:57 -0500 Received: by qwj8 with SMTP id 8so1163423qwj.4 for ; Wed, 09 Mar 2011 22:39:56 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 10 Mar 2011 12:09:56 +0530 Message-ID: Subject: Re: [Qemu-devel] how to convert guest virtual address to host virtual address in QEMU? From: Gunasekaran Dharman Content-Type: multipart/alternative; boundary=0016e65bb838192e20049e1b1d66 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org --0016e65bb838192e20049e1b1d66 Content-Type: text/plain; charset=ISO-8859-1 Hi Stefan Thanks for your valuable suggestion. I will try the custom memcpy instruction. I have a question regarding virtual machine's CPU frequency. Compared to real processor how QEMU is emulating the processor speed? Can we configure the virtual machine's CPU frequency? If yes, what are the limitations and impact of changing the CPU frequency. Regards Guna On Wed, Mar 9, 2011 at 4:57 PM, Stefan Hajnoczi wrote: > On Wed, Mar 9, 2011 at 9:34 AM, Gunasekaran Dharman > wrote: > > Regarding calculating host virtual address from guest virtual address, I > > think, QEMU must be doing this somehow. > > I would like to know how QEMU is handling the guest virtual address? > > It will be very much helpful if you can throw some light on this. > > Sorry but I've tried to explain twice that this approach is not the > way to go. The hardware does not necessarily know how to translate > any virtual address by itself and QEMU doesn't either, guest > assistance may be required. It's not as simple as handing a (kernel > or userspace?) virtual address to a custom device and having it > perform a memcpy. > > If you really want to do a custom hack try adding a custom memcpy > instruction and look at how x86 targets rep; mov or other instances of > memory copy on other architectures are done. You'll need to write a > custom memcpy implementation in the guest to make use of this > function. > > Stefan > --0016e65bb838192e20049e1b1d66 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Stefan

Thanks for your valuable suggestion= .

I will try the custom memcpy instruction.=A0I have a = question regarding virtual machine's CPU frequency.
Compared to rea= l processor how QEMU is emulating the processor speed?
Can we configure the virtual=A0machine's CPU frequency?=A0If yes, = what are the limitations and impact
of changing the CPU frequency= .

Regards
Guna


On Wed, Mar 9, 2011 at 4:57 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
On Wed, Mar 9, 2011 at 9:34 AM, Gunasekaran Dharman <<= a href=3D"mailto:guna.spam@gmail.com">guna.spam@gmail.com> wrote: > Regarding calculating host=A0virtual address=A0from guest=A0virtual ad= dress, I
> think, QEMU must be doing this somehow.
> I would like to know how QEMU is handling the guest virtual address? > It will be very much helpful if you can throw some light on this.

Sorry but I've tried to explain twice that this approach is not t= he
way to go. =A0The hardware does not necessarily know how to translate
any virtual address by itself and QEMU doesn't either, guest
assistance may be required. =A0It's not as simple as handing a (kernel<= br> or userspace?) virtual address to a custom device and having it
perform a memcpy.

If you really want to do a custom hack try adding a custom memcpy
instruction and look at how x86 targets rep; mov or other instances of
memory copy on other architectures are done. =A0You'll need to write a<= br> custom memcpy implementation in the guest to make use of this
function.

Stefan

--0016e65bb838192e20049e1b1d66--