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-ppc-devel

Re: [XenPPC] [PATCH 4 of 6] [PATCH] xen: implement guest_physmap_{add/re

To: Ryan Harper <ryanh@xxxxxxxxxx>
Subject: Re: [XenPPC] [PATCH 4 of 6] [PATCH] xen: implement guest_physmap_{add/remove}_page for ppc
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Thu, 22 Feb 2007 16:19:16 -0600
Cc: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 22 Feb 2007 14:19:20 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <33f05ec503bfabccd119.1172103422@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
References: <33f05ec503bfabccd119.1172103422@xxxxxxxxxxxxxxxxxxxxx>
Reply-to: Hollis Blanchard <hollisb@xxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 2007-02-21 at 18:17 -0500, Ryan Harper wrote:
> @@ -504,17 +508,15 @@ unsigned long mfn_to_gmfn(struct domain 
>          mfn < (rma_mfn + (1 << d->arch.rma_order)))
>          return mfn - rma_mfn;
> 
> -    /* Extent? */
> -    cur_pfn = 1UL << d->arch.rma_order;
> -    list_for_each_entry (pe, &d->arch.extent_list, pe_list) {
> -        uint pe_pages = 1UL << pe->order;
> -        uint b_mfn = page_to_mfn(pe->pg);
> -        uint e_mfn = b_mfn + pe_pages;
> -
> -        if (mfn >= b_mfn && mfn < e_mfn) {
> +    /* check extents (cpu-defined contiguous chunks after RMA) */
> +    cur_pfn = 1UL << d->arch.rma_order; /* start looking after RMA */
> +    for ( ; cur_pfn < d->max_pages; cur_pfn += ext_nrpages )
> +    {
> +        uint b_mfn = d->arch.p2m[cur_pfn];
> +        uint e_mfn = b_mfn + ext_nrpages;
> +
> +        if (mfn >= b_mfn && mfn < e_mfn)
>              return cur_pfn + (mfn - b_mfn);
> -        }
> -        cur_pfn += pe_pages;
>      }
>      return INVALID_M2P_ENTRY;
>  } 

I think you're splitting these patches up a lot more than necessary (to
the point I've having a hard time understanding them). Also, the above
code is just removed by the next patch! If you combine 4 and 5 I think
it will actually be smaller and easier to understand.

I didn't realize these were just RFC. When you resubmit, could you put a
little more description in each commit message?

-- 
Hollis Blanchard
IBM Linux Technology Center


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

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