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] Read value of CR3 from DomU VCPU

To: "Nimgaonkar, Satyajeet" <SatyajeetNimgaonkar@xxxxxxxxxx>
Subject: Re: [Xen-devel] Read value of CR3 from DomU VCPU
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Thu, 5 May 2011 09:33:49 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 05 May 2011 01:34:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <12871952FC0E29439F861FA745BCDD850D348B3A@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <12871952FC0E29439F861FA745BCDD850D348B3A@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
At 21:28 +0100 on 04 May (1304544537), Nimgaonkar, Satyajeet wrote:
> Hi,
>     I intend to map the DomU kernel memory to the Dom0 using the
> function xc_map_foreign_range(). For this I need the machine frame
> number (mfn) for the page I want to map. To get the value of mfn I want
> to read the value of cr3 from the DomU Vcpu data structure i.e. the
> value of ctrlreg[3] from a vcpu_guest_context object.

Look at xc_translate_foreign_address() in tools/libxc/xc_pagetab.c; it
does VA->MFN translations, including extracting CR3.

Cheers,

Tim.

> Also I have implemented a hypercall and wish to read the cr3 value in the 
> hypercall handler.
> Can anyone share some information regarding how read the cr3 value. Any code 
> examples would help me significantly.
> Thanks a lot.
> 
> Regards,
> Jeet

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


-- 
Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, Xen Platform Team
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

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

<Prev in Thread] Current Thread [Next in Thread>