From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: MULTI_mmu_update, HYPERVISOR_mmu_update and pte entry Date: Tue, 17 May 2011 15:29:05 -0700 Message-ID: <4DD2F6B1.5080208@goop.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: chrisbenninger Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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