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] The patch fixes RAM above 4G unrecognized issue

To: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
Subject: Re: [Xen-devel] The patch fixes RAM above 4G unrecognized issue
From: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
Date: Tue, 5 Dec 2006 12:13:51 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 05 Dec 2006 04:13:50 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <666CC8FCE3247C4DA876BA979059781A5C27E5@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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: <666CC8FCE3247C4DA876BA979059781A5C27E5@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
At 19:40 +0800 on 05 Dec (1165347638), Cui, Dexuan wrote:
> --- a/xen/arch/x86/mm/shadow/common.c   Mon Dec 04 09:29:26 2006 +0000
> +++ b/xen/arch/x86/mm/shadow/common.c   Tue Dec 05 18:04:07 2006 +0800
> @@ -1246,7 +1246,7 @@ sh_gfn_to_mfn_foreign(struct domain *d,
>  /* Read another domain's p2m entries */
>  {
>      mfn_t mfn;
> -    unsigned long addr = gpfn << PAGE_SHIFT;
> +    uint64_t addr = ((uint64_t)gpfn) << PAGE_SHIFT;

Please use paddr_t for this kind of thing; it will be the right size on
all architectures.

>  #define PAGETABLE_ORDER         9
>  #define L1_PAGETABLE_ENTRIES    (1<<PAGETABLE_ORDER)
>  #define L2_PAGETABLE_ENTRIES    (1<<PAGETABLE_ORDER)
> -#define L3_PAGETABLE_ENTRIES    4
> -#define ROOT_PAGETABLE_ENTRIES  L3_PAGETABLE_ENTRIES
> +#define L3_PAGETABLE_ENTRIES    8
> +#define ROOT_PAGETABLE_ENTRIES  4

This will break all kinds of things.  I'll make a proper fix for 
sh_gfn_to_mfn_foreign() not to use l3_table_offset() instead.

Cheers,

Tim.

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

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