[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] xc_ptrace fix


  • To: Leendert van Doorn <leendert@xxxxxxxxxxxxxx>
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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) -
                    frame_table;
               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.

Thanks. 


                              -Kip

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.