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

[Xen-devel] Re: [PATCH 06/10] xen/setup: Only set identity mapping in E8

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 06/10] xen/setup: Only set identity mapping in E820 regions when privileged.
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Wed, 22 Dec 2010 10:07:59 -0500
Cc: Konrad Rzeszutek Wilk <konrad@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Jan Beulich <JBeulich@xxxxxxxxxx>, hpa@xxxxxxxxx
Delivery-date: Wed, 22 Dec 2010 07:13:59 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4D112C0D.6060400@xxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1292967460-15709-1-git-send-email-konrad.wilk@xxxxxxxxxx> <1292967460-15709-7-git-send-email-konrad.wilk@xxxxxxxxxx> <4D112C0D.6060400@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
On Tue, Dec 21, 2010 at 02:37:01PM -0800, Jeremy Fitzhardinge wrote:
> On 12/21/2010 01:37 PM, Konrad Rzeszutek Wilk wrote:
> > We do not want to set the identity mapping on E820 reserved
> > regions when running as PV. This is b/c the 0->ISA_END_ADDRESS region
> > would be considered identity and we would try to read DMI information
> > and fail (since the pfn_to_mfn(mfn)==pfn) under PV guests.
> >
> > Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> > ---
> >  arch/x86/xen/setup.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
> > index 752c865..34fb906 100644
> > --- a/arch/x86/xen/setup.c
> > +++ b/arch/x86/xen/setup.c
> > @@ -160,7 +160,7 @@ static unsigned long __init xen_set_identity(const 
> > struct e820map *e820)
> >             if (end < start)
> >                     continue;
> >  
> > -           if (e820->map[i].type != E820_RAM) {
> > +           if (xen_initial_domain() && e820->map[i].type != E820_RAM) {
> >                     for (pfn = PFN_UP(start); pfn < PFN_DOWN(end); pfn++)
> >                             set_phys_to_machine(pfn, pfn);
> >                     identity += pfn - PFN_UP(start);
> 
> So you're relying on the fact that the ISA area is the only non-RAM e820
> entry in domU?  I think it would be better to do a specific exclusion
> for the ISA area rather than this.

Ok. I've rolled something along what xen_return_unused regions does in the
function.

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

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