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:47:59 -0500 [thread overview]
Message-ID: <20110216154759.GA3921@dumpdata.com> (raw)
In-Reply-To: <20110216152021.GA5894@dumpdata.com>
[-- Attachment #1: Type: text/plain, Size: 550 bytes --]
On Wed, Feb 16, 2011 at 10:20:21AM -0500, Konrad Rzeszutek Wilk wrote:
> 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?
Also did you try to revert 0b56d9994ebe34df77fa156d2068ad93b7877b44 and see
how that works? Here is the revert attached
[-- Attachment #2: b4a69e9649d393a911b4e006a5362ad6db407faf --]
[-- Type: text/plain, Size: 2284 bytes --]
commit b4a69e9649d393a911b4e006a5362ad6db407faf
Author: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Date: Wed Feb 16 10:38:43 2011 -0500
Revert "xen: drop all the special iomap pte paths."
This reverts commit 0b56d9994ebe34df77fa156d2068ad93b7877b44.
Conflicts:
arch/x86/xen/mmu.c
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index d9cc3a0..cac8386 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -637,7 +637,12 @@ static bool xen_page_pinned(void *ptr)
return PagePinned(page);
}
-void xen_set_domain_pte(pte_t *ptep, pte_t pteval, unsigned domid)
+static bool xen_iomap_pte(pte_t pte)
+{
+ return pte_flags(pte) & _PAGE_IOMAP;
+}
+
+static void xen_set_iomap_pte(pte_t *ptep, pte_t pteval)
{
struct multicall_space mcs;
struct mmu_update *u;
@@ -649,11 +654,10 @@ void xen_set_domain_pte(pte_t *ptep, pte_t pteval, unsigned domid)
u->ptr = arbitrary_virt_to_machine(ptep).maddr;
u->val = pte_val_ma(pteval);
- MULTI_mmu_update(mcs.mc, mcs.args, 1, NULL, domid);
+ MULTI_mmu_update(mcs.mc, mcs.args, 1, NULL, DOMID_IO);
xen_mc_issue(PARAVIRT_LAZY_MMU);
}
-EXPORT_SYMBOL_GPL(xen_set_domain_pte);
static void xen_extend_mmu_update(const struct mmu_update *update)
{
@@ -731,6 +735,11 @@ void set_pte_mfn(unsigned long vaddr, unsigned long mfn, pgprot_t flags)
void xen_set_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t pteval)
{
+ if (xen_iomap_pte(pteval)) {
+ xen_set_iomap_pte(ptep, pteval);
+ goto out;
+ }
+
ADD_STATS(set_pte_at, 1);
// ADD_STATS(set_pte_at_pinned, xen_page_pinned(ptep));
ADD_STATS(set_pte_at_current, mm == current->mm);
@@ -962,6 +971,11 @@ void xen_set_pud(pud_t *ptr, pud_t val)
void xen_set_pte(pte_t *ptep, pte_t pte)
{
+ if (xen_iomap_pte(pte)) {
+ xen_set_iomap_pte(ptep, pte);
+ return;
+ }
+
ADD_STATS(pte_update, 1);
// ADD_STATS(pte_update_pinned, xen_page_pinned(ptep));
ADD_STATS(pte_update_batched, paravirt_get_lazy_mode() == PARAVIRT_LAZY_MMU);
@@ -978,6 +992,11 @@ void xen_set_pte(pte_t *ptep, pte_t pte)
#ifdef CONFIG_X86_PAE
void xen_set_pte_atomic(pte_t *ptep, pte_t pte)
{
+ if (xen_iomap_pte(pte)) {
+ xen_set_iomap_pte(ptep, pte);
+ return;
+ }
+
set_64bit((u64 *)ptep, native_pte_val(pte));
}
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2011-02-16 15:47 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
2011-02-16 15:47 ` Konrad Rzeszutek Wilk [this message]
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=20110216154759.GA3921@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.