All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: "Zhang, Fengzhe" <fengzhe.zhang@intel.com>
Cc: xen-devel <xen-devel@lists.xensource.com>,
	"Dong, Eddie" <eddie.dong@intel.com>,
	"Li, Xin" <xin.li@intel.com>
Subject: Re: [PATCH] iomem: Prevent Dom0 pci bus from allocating RAM as I/O space
Date: Wed, 16 Feb 2011 10:20:21 -0500	[thread overview]
Message-ID: <20110216152021.GA5894@dumpdata.com> (raw)
In-Reply-To: <20110216150638.GC12215@dumpdata.com>

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

?

  reply	other threads:[~2011-02-16 15:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-16 14:26 [PATCH] iomem: Prevent Dom0 pci bus from allocating RAM as I/O space Zhang, Fengzhe
2011-02-16 15:06 ` Konrad Rzeszutek Wilk
2011-02-16 15:20   ` Konrad Rzeszutek Wilk [this message]
2011-02-16 15:47     ` Konrad Rzeszutek Wilk
2011-02-17  5:32       ` Fengzhe Zhang
2011-02-17 14:23         ` [PATCH] iomem: Prevent Dom0 pci bus from allocating RAM as I/O space in 2.6.32.27 tree Konrad Rzeszutek Wilk
2011-02-17 15:07           ` Li, Xin
2011-02-17 15:35             ` Konrad Rzeszutek Wilk
2011-02-18 15:16         ` [PATCH] iomem: Prevent Dom0 pci bus from allocating RAM as I/O space Konrad Rzeszutek Wilk
2011-02-20 13:58           ` Fengzhe Zhang
2011-02-17  4:11   ` Fengzhe Zhang
2011-02-18 22:05 ` Konrad Rzeszutek Wilk
2011-02-20 14:14   ` Fengzhe Zhang
2011-02-21 10:35     ` Li, Xin
2011-02-21 19:20       ` Konrad Rzeszutek Wilk
2011-02-22  4:55         ` Li, Xin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110216152021.GA5894@dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=eddie.dong@intel.com \
    --cc=fengzhe.zhang@intel.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=xin.li@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.