From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Benninger Subject: Re: MULTI_mmu_update, HYPERVISOR_mmu_update and pte entry Date: Wed, 18 May 2011 05:25:30 +0000 Message-ID: References: <4DD2F6B1.5080208@goop.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1686010958==" Return-path: In-Reply-To: <4DD2F6B1.5080208@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============1686010958== Content-Type: multipart/alternative; boundary=20cf301afa19baa9c404a3861f7c --20cf301afa19baa9c404a3861f7c Content-Type: text/plain; charset=ISO-8859-1 Hi Jeremy, I am definitely doing something weird, but on purpose. I am trying to determine which process specifically owns the pte in question. I have a domU module which I can ask for information, I just dont know how to get the ptr provided, into a useful context I can send it. Chris Benninger University of Victoria, Computer Science cbenning@cs.uvic.ca http://benninger.ca On Tue, May 17, 2011 at 10:29 PM, Jeremy Fitzhardinge wrote: > On 05/12/2011 03:41 PM, chrisbenninger wrote: > > Hi, I am working on being able to determine which process owns a PTE > > being changed during each MMU update in 64-bit paravirtualized mode. I > > have a couple questions here. > > > > 1. When a linux DomU wants to make an update to a PTE, it calls > > HYPERVISOR_mmu_update? In my case it appears to be calling > > MULTI_mmu_update mostly. Are these two functions the only primary ways > > a VM will ask for an MMU update? > > There's also update_va_mapping and direct writes to the pte which are > trapped and emulated. However, I've got patches to drop the use of > update_va_mapping in pvops Linux, at least. > > > 2. The mmu_update struct that comes along with a MMU update has a > > /unint64_t ptr/ which is a machine address to the PTE being changed. > > Is there any way to use this machine address and determine the pte_t > > or page from within a DomU? > > From within domU? You could convert it back into a pseudo-phys address > and get the pfn, but its hard to connect a random pte page to a virtual > address or even connect it to an address space. > > What are you trying to achieve? Most usermode pte updates will be to > the current process. > > J > --20cf301afa19baa9c404a3861f7c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Jeremy,

I am definitely doing something weird, but on= purpose. I am trying to determine which process specifically owns the pte = in question. I have a domU module which I can ask for information, I just d= ont know how to get the ptr provided, into a useful context I can send it.<= /div>

Chris Benninger
<= font color=3D"#666666">
University of Victoria, Computer Science
cbenning@cs.uvic.ca
http://benninger.ca<= /font>



On Tue, May 17, 2011 at 10:29 PM, Jeremy= Fitzhardinge <jere= my@goop.org> wrote:
On 05/12/2011 03:41 PM, chrisbenninger wrote:
> Hi, I am working on being able to determine which process owns a PTE > being changed during each MMU update in 64-bit paravirtualized mode. I=
> have a couple questions here.
>
> 1. When a linux DomU wants to make an update to a PTE, it calls
> HYPERVISOR_mmu_update? In my case it appears to be calling
> MULTI_mmu_update mostly. Are these two functions the only primary ways=
> a VM will ask for an MMU update?

There's also update_va_mapping and direct writes to the pte which= are
trapped and emulated. =A0However, I've got patches to drop the use of update_va_mapping in pvops Linux, at least.

> 2. The mmu_update struct that comes along with a MMU update has a
> /unint64_t ptr/ =A0which is a machine address to the PTE being changed= .
> Is there any way to use this machine address and determine the pte_t > or page from within a DomU?

From within domU? =A0You could convert it back into a pseudo-phys add= ress
and get the pfn, but its hard to connect a random pte page to a virtual
address or even connect it to an address space.

What are you trying to achieve? =A0Most usermode pte updates will be to
the current process.

=A0 =A0J

--20cf301afa19baa9c404a3861f7c-- --===============1686010958== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1686010958==--