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] Identifying pagetype in they hypervisor

To: "Mark Williamson" <mark.williamson@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Identifying pagetype in they hypervisor
From: "Mike Sun" <msun@xxxxxxxxxx>
Date: Sun, 24 Aug 2008 22:01:05 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 24 Aug 2008 19:01:28 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=DPsHJuAEYvNFQZP8HR8/0XcN7DBkDZzo2mfB9qHI/y0=; b=dSq9gwSIUkmfhPnyHL1Rv/VcOjjoE1qMJALkiceLF0a99iVx21wg3lucgWEmWxcLvP GzR5cPh8x6tsvOwgN9cvnY4szcZx4IrXPThhgDN/vTvVgQm08IoPbgVQ6G+RvT16zdyC gJWycOWAbdByYwhc91u72/vy428ANtmR3/k60=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=TzksAoJ55NsiY0WRXl18yAfbOcppYCl9LpUqZR5eK8ig9bgM23k7dv1TPGAJAhrJLx ez4q3RxpvgI9wGLsfg6WPOksvnEkHKukyTMvnD1HpHkXjv2iM4VYo7UxlEzKahjUVD6/ u0+H6ObyxMkhtWNe7uV9xOFwbKyF7xy3U6A+A=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200808250210.43466.mark.williamson@xxxxxxxxxxxx>
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: <e4e579070808241747u2e699972o2e1f35cc96a950e4@xxxxxxxxxxxxxx> <200808250210.43466.mark.williamson@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thanks Mark.  That's what I think I'm looking for.

I think I've managed to confuse myself a bit again (haven't touched
the modifications I made to the shadow code in a while) with the
gmfn/mfn naming in the shadow code.  In _sh_propagate(...,
target_fmn,..) and _sh_mark_dirty(..., gmfn), I'm assuming that a real
machine frame number is passed to those functions, not a
pseudo-physical one... am I correct?

Basically, I need to be sure that when the sh_page_fault_handler()
eventually calls _sh_propagate(), it passes the machine frame number
of the faulting page, not the HVM guest's perceived physical address
(gmfn/pseudo-physical).

Thanks,
Mike

On Sun, Aug 24, 2008 at 9:10 PM, Mark Williamson
<mark.williamson@xxxxxxxxxxxx> wrote:
> I'm looking at the latest code but I would think the same code applies.
>
> Maybe you could try mfn_to_page() to get the struct page_info * and then poke
> about in that for the current type?  In order to make this useful you'd
> probably have to do a get_page or similar to avoid races with other CPUs.
>
> Cheers,
> Mark
>
> On Monday 25 August 2008 01:47:19 Mike Sun wrote:
>> Hi --
>>
>> I'm working off of a bit older branch, 3.1.0, but hopefully the
>> question is still relevant.
>>
>> In the suspend/restore code in 'tools/libxc/xc_domain_save.c', as part
>> of the saved record, a list of pfn_types are saved prior to the actual
>> pages themselves.  These pfn_types are pfns with a type bits
>> associated with them that are accessed with the XEN_DOMCTL_PFINFO_XTAB
>> bitmask.
>>
>> I'm doing some copy-on-write work, and when I intercept writes in the
>> hypervisor, I need to copy both the actual page, and the type
>> associated with the page (so that it could later be properly written
>> out to the save record).  I've modified the shadow page table code to
>> handle write faults associated with CoW and am able to get the mfn of
>> the faulting page and perform the copy; I cannot seem to find where
>> given the mfn, I can find the page type associated with it.  Could
>> anybody help point me to the right place or direction?
>>
>> Much thanks,
>> Mike
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@xxxxxxxxxxxxxxxxxxx
>> http://lists.xensource.com/xen-devel
>
>

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