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] PAE xen + linux kernel boots ...

To: Scott Parish <srparish@xxxxxxxxxx>
Subject: Re: [Xen-devel] PAE xen + linux kernel boots ...
From: Gerd Knorr <kraxel@xxxxxxxxxxx>
Date: Sun, 1 May 2005 01:01:54 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sat, 30 Apr 2005 23:04:40 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20050430090117.GC16883@xxxxxxxxxx>
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: <20050425172624.GB22076@bytesex> <87ll74o29m.fsf@xxxxxxxxxxx> <20050430090117.GC16883@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
> The hypervisor was taking a pagefault in ptwr_emulated_update() when
> pl1e (a map_domain_mem() mapped page) was dereferenced to be
> copied. pl1e is a 64 bit type with pae, but only the first 4 bytes
> were getting mapped, and there was a case where pl1e would straddle
> a page boundary,

Huh?  page table entries must be 8-byte aligned, so they never ever
can cross a page border.  Must be something else.

> -void *map_domain_mem(unsigned long pa)
> +void *map_domain_mem(unsigned long long pa)

Hmm, I guess the most sane approach is to add a new type for 
physical addresses, simply using "unsigned long long" isn't
a good idea ...

> -        idx = map_idx = (map_idx + 1) & (MAPCACHE_ENTRIES - 1);
> +        idx = map_idx = (map_idx + 2) & (MAPCACHE_ENTRIES - 1);

>      cache[idx] = l1e_create_phys(pa, __PAGE_HYPERVISOR);
> +    cache[idx + 1] = l1e_create_phys(pa + sizeof(u32), __PAGE_HYPERVISOR);

That looks a bit fishy, like hiding a bug somewhere else.
And most likely will break for non-pae ...

  Gerd

-- 
#define printk(args...) fprintf(stderr, ## args)

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