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] [PATCH] iomem: Prevent Dom0 pci bus from allocating RAM

To: "Zhang, Fengzhe" <fengzhe.zhang@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] iomem: Prevent Dom0 pci bus from allocating RAM as I/O space
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Wed, 16 Feb 2011 10:20:21 -0500
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Dong, Eddie" <eddie.dong@xxxxxxxxx>, "Li, Xin" <xin.li@xxxxxxxxx>
Delivery-date: Wed, 16 Feb 2011 07:21:33 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110216150638.GC12215@xxxxxxxxxxxx>
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: <1A42CE6F5F474C41B63392A5F80372B2335E978C@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20110216150638.GC12215@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
On Wed, Feb 16, 2011 at 10:06:38AM -0500, Konrad Rzeszutek Wilk wrote:
> On Wed, Feb 16, 2011 at 10:26:20PM +0800, Zhang, Fengzhe wrote:
> > iomem: Prevent Dom0 pci bus from allocating RAM as I/O space
> 
> Is there a bug # associated with this? Is this associated with the intel-agp
> driver trying to ioremap the scratch page and bombing out?
> 
> > 
> > In Dom0, pci bus dynamically allocates I/O address resources from memory 
> > hole within 4GB physical space, which can be RAM space not allocated to 
> > Dom0. This patch set physical RAM space to be unusable in Dom0 E820 map if 
> > they are not owned by Dom0 to prevent them from being misused as I/O 
> > address space. Dom0 is assumed to look for MMIO space only below 4GB. If 
> > this assumption is broken, additional fixes are required.
> 
> You mention "RAM space" and then "physical RAM" misused as "I/O" address 
> space.

Hmm, is the issue that we have this E820:

(XEN)  000000000009d000 - 00000000000a0000 (reserved)^M
(XEN)  00000000000e0000 - 0000000000100000 (reserved)^M
(XEN)  0000000000100000 - 000000009cf67000 (usable)^M
(XEN)  000000009cf67000 - 000000009d103000 (ACPI NVS)^M
(XEN)  000000009d103000 - 000000009f6bd000 (usable)^M
(XEN)  000000009f6bd000 - 000000009f6bf000 (reserved)^M
(XEN)  000000009f6bf000 - 000000009f714000 (usable)^M
(XEN)  000000009f714000 - 000000009f7bf000 (ACPI NVS)^M
(XEN)  000000009f7bf000 - 000000009f7e0000 (usable)^M
(XEN)  000000009f7e0000 - 000000009f7ff000 (ACPI data)^M
(XEN)  000000009f7ff000 - 000000009f800000 (usable)^M
(XEN)  000000009f800000 - 00000000a0000000 (reserved)^M

with System RAM regions sprinkled around the reserved and when
you use dom0_mem=1GB, the setup.c has made those regions size 0
(by subtracting the delta), so that when e820_santize gets called it
will remove them altogether and end up converting those areas in gaps,
as so:

[    0.000000] BIOS-provided physical RAM map:^M^M
[    0.000000]  Xen: 0000000000000000 - 000000000009d000 (usable)^M^M
[    0.000000]  Xen: 000000000009d000 - 0000000000100000 (reserved)^M^M
[    0.000000]  Xen: 0000000000100000 - 0000000040000000 (usable)^M^M
[    0.000000]  Xen: 000000009cf67000 - 000000009d103000 (ACPI NVS)^M^M
[    0.000000]  Xen: 000000009f6bd000 - 000000009f6bf000 (reserved)^M^M
[    0.000000]  Xen: 000000009f714000 - 000000009f7bf000 (ACPI NVS)^M^M
[    0.000000]  Xen: 000000009f7e0000 - 000000009f7ff000 (ACPI data)^M^M
[    0.000000]  Xen: 000000009f800000 - 00000000b0000000 (reserved)^M^M
[    0.000000]  Xen: 00000000fc000000 - 00000000fd000000 (reserved)^M^M
[    0.000000]  Xen: 00000000fec00000 - 00000000fec01000 (reserved)^M^M
[    0.000000]  Xen: 00000000fee00000 - 00000000fee01000 (reserved)^M^M
[    0.000000]  Xen: 00000000ffe00000 - 0000000100000000 (reserved)^M^M
[    0.000000]  Xen: 0000000100000000 - 00000001bf598000 (usable)^M^M

?

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