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/
Home Products Support Community News


Re: [Xen-devel] xc_ptrace fix

To: Leendert van Doorn <leendert@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] xc_ptrace fix
From: Kip Macy <kip.macy@xxxxxxxxx>
Date: Thu, 28 Apr 2005 21:24:36 -0700
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 29 Apr 2005 04:24:18 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=k8ujwuorwlekkVydvXCEmkx4BDY0T5sEmSLU+v+IDVzC0Htc4QoQKJakPcPyBmRGqBV4E6SdzV9IMmg7Mmov9aVyy1NJ75GCtRpWjlfa9XwXy4RrTuDWycMNqUzkldO3d31RWTUKnBUedrt411/mqtjZCUWyScpWiIgcsqJFTmY=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20050429033018.1E44B111C@xxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20050429033018.1E44B111C@xxxxxxxxxxxxxxxxxxxxx>
Reply-to: Kip Macy <kip.macy@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
What you're doing could work in principle, but the page array would
have to be equal to the number of pages on the machine not the number
of "physical" pages in the guest. In the paravirtualized case you are
reading from the hardware page tables, so although the guest may only
be using 64MB its pages may reside at the edge of 4GB. The
segmentation fault I sent earlier was caused by the inevitable
indexing off the edge of the array.

Looking at the code in DOM0_GETMEMINFO:
            for ( i = 0; (i < max_pfns) && (list_ent != &d->page_list); i++ )
                pfn = list_entry(list_ent, struct pfn_info, list) -
               if ( put_user(pfn, buffer) )

It only adds an entry for each page in use, which I assume means it is
just the p2m mapping of page frames.

> So it does not return an indentity map for paravirtualized guests?
> Sorry about that, I'll make sure my fixes are programmed more defensive
> next time.



Xen-devel mailing list

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