WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] address translation in hvm mode

To: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Subject: Re: [Xen-devel] address translation in hvm mode
From: rajneesh rana <rajneeshrana009@xxxxxxxxx>
Date: Wed, 30 Jan 2008 05:28:45 -0800 (PST)
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 30 Jan 2008 05:29:26 -0800
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=kvrbKZgOtcFkMIwpDnbQHi4CjFiCoOSKj7PHs7lHTWxdIrwoXMvQCWmWJODJ9pbBaRi+CuMBLQlbEd0ZuZGDGx0waq2eNuMhVs3UmN9HdR78i+PczfaQJfqp3MiygejB5iEqAlH3KzZEuuULhvYE9PIha6Syc/mH70uHp6T36nw=;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080129155839.GA24771@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
thanx for suggestion

printk trace shows that it using sh_gva_to_gfn. Inside guest_walk_to_gfn,  a call to function guest_l1e_get_flags returns 0.

I think it work only for v==current. Is there any other approach that i can take.

you mentions about hap_gva_to_gfn. When hvm uses this hap_gva_to_gfn depending upon hardware.

regards
rajneesh rana

Tim Deegan <Tim.Deegan@xxxxxxxxxx> wrote:
At 04:54 -0800 on 29 Jan (1201582491), rajneesh rana wrote:
> i am new to xen-development and currently trying to understand memory mgmt in hvm mode
> I am writing a hypercall which takes input of virtual address of domu. hypercall translate this address to machine and return 4kb page from thereafter.
> Inside hypercall, i m using paging_gva_to_gfn function but it returns -1 instead of returning valid gfn.
>
> what wrong with my approach.

It should work, though I'm not sure that any other code calls
paging_gva_to_gfn() with v != current. It will depend on the hardware
you run on whether the function called is actually hap_gva_to_gfn_
or sh_gva_to_gfn; you could try instrumenting with printk or otherwise.

Cheers,

Tim.

--
Tim Deegan
Principal Software Engineer, Citrix Systems (R&D) Ltd.
[Company #02300071, SL9 0DZ, UK.]

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


Never miss a thing. Make Yahoo your homepage.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel