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] MULTI_mmu_update, HYPERVISOR_mmu_update and pte entry

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] MULTI_mmu_update, HYPERVISOR_mmu_update and pte entry
From: Christopher Benninger <chrisbenninger@xxxxxxxxx>
Date: Wed, 18 May 2011 05:25:30 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 17 May 2011 22:26:37 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=R95XTnj9rDNYuxFHozLIHp0hS0TOZU/gbqxaneax7OE=; b=eFyJk7886LJmi4m+Ljyo4q8aIhGvtb6uguJXVY3qHkL9IWZ+2nYp2pRG/aYkelnKxq ZDkzncGt5csQCvTMqPtWUCxZrXgy3TsP0BcX4c18O7yWKJND76eYWs5edWHOKRqyDaqh BseDH74f0DV84z50ld/LBPFI2yvE8qAlf8nLM=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=l3mYkpEP+1CCzJmiqS5eK0QluRdLeuFMiTurq477Rlk7YggaddZ8pZ8+51hxxrKQnv 1lmY4BwJbJ4m7TSkYYOifBwlem1O9eNrPH6qI7eFvYyYjHFfY3hhcH5Xvsg15JpwigxD WLvSHvHG++Z5NibJJe/La0xY6c1ZVMw1AXEqk=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4DD2F6B1.5080208@xxxxxxxx>
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: <BANLkTim1p6W=zq9MDoU+xkmrR2xvapQ4mA@xxxxxxxxxxxxxx> <4DD2F6B1.5080208@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxx
http://benninger.ca



On Tue, May 17, 2011 at 10:29 PM, Jeremy Fitzhardinge <jeremy@xxxxxxxx> 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

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