From: Daniel Magenheimer Subject: RE: [PATCH] Add new location of Linux direct-map to the places to look for writable mappings Date: Fri, 12 Sep 2008 08:57:54 -0700 (PDT) Message-ID: <46f44832-0241-48ff-a6d2-d278003d42a1@default> References: Mime-Version: 1.0 Content-Type: text/plain; charset=Windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: George Dunlap , xen-devel mailing list List-Id: xen-devel@lists.xenproject.org I haven't even looked at this code so sorry for my possibly naive comment, but isn't this just asking for trouble to hardcode constants that apply to specific OS's? Isn't there a way to "sense" that this address is used a lot and add it to a dynamic list that can be checked? Else sooner or later some user is going to say "I tried Xen on xxx OS and performance sucked and it was fine on (unnamed virtualization platform)". But that=20 user might not be as diligent about reporting to xen-devel as Todd was. > -----Original Message----- > From: George Dunlap [mailto:George.Dunlap@eu.citrix.com] > Sent: Friday, September 12, 2008 9:39 AM > To: xen-devel mailing list > Subject: [Xen-devel] [PATCH] Add new location of Linux=20 > direct-map to the > places to look for writable mappings >=20 >=20 > Add new location of Linux direct-map to the places to look for > writable mappings. >=20 > Signed-off-by: George Dunlap >=20 > diff -r dbac9ee4d761 xen/arch/x86/mm/shadow/common.c > --- a/xen/arch/x86/mm/shadow/common.c=09Mon Sep 08 16:02:13 2008 +0100 > +++ b/xen/arch/x86/mm/shadow/common.c=09Fri Sep 12 16:42:32 2008 +0100 > @@ -2385,9 +2385,11 @@ int sh_remove_write_access(struct vcpu * > + ((fault_addr & VADDR_MASK) >>=20 > 27), 3); break; > } >=20 > - /* 64bit Linux direct map at 0xffff810000000000;=20 > older kernels > - * had it at 0x0000010000000000UL */ > + /* 64bit Linux direct map at 0xffff880000000000;=20 > older kernels > + * had it at 0xffff880000000000, and older=20 > kernels yet had it > + * at 0x0000010000000000UL */ > gfn =3D mfn_to_gfn(v->domain, gmfn); > + GUESS(0xffff880000000000UL + (gfn << PAGE_SHIFT), 4); > GUESS(0xffff810000000000UL + (gfn << PAGE_SHIFT), 4); > GUESS(0x0000010000000000UL + (gfn << PAGE_SHIFT), 4); >=20 > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >