From: David Vrabel <david.vrabel@citrix.com>
To: xen-devel@lists.xen.org
Cc: x86@kernel.org, Ingo Molnar <mingo@redhat.com>,
David Vrabel <david.vrabel@citrix.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH 5/8] x86/xen: set regions above the end of RAM as 1:1
Date: Mon, 3 Feb 2014 17:01:34 +0000 [thread overview]
Message-ID: <1391446897-21998-6-git-send-email-david.vrabel@citrix.com> (raw)
In-Reply-To: <1391446897-21998-1-git-send-email-david.vrabel@citrix.com>
From: David Vrabel <david.vrabel@citrix.com>
PCI devices may have BARs located above the end of RAM so mark such
frames as identity frames in the p2m (instead of the default of
missing).
PFNs outside the p2m (above MAX_P2M_PFN) are also considered to be
identity frames for the same reason.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
---
arch/x86/xen/p2m.c | 2 +-
arch/x86/xen/setup.c | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
index 3f45c27..98c32f6 100644
--- a/arch/x86/xen/p2m.c
+++ b/arch/x86/xen/p2m.c
@@ -507,7 +507,7 @@ unsigned long get_phys_to_machine(unsigned long pfn)
unsigned topidx, mididx, idx;
if (unlikely(pfn >= MAX_P2M_PFN))
- return INVALID_P2M_ENTRY;
+ return IDENTITY_FRAME(pfn);
topidx = p2m_top_index(pfn);
mididx = p2m_mid_index(pfn);
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index 2afe55e..210426a 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -469,6 +469,15 @@ char * __init xen_memory_setup(void)
}
/*
+ * Set the rest as identity mapped, in case PCI BARs are
+ * located here.
+ *
+ * PFNs above MAX_P2M_PFN are considered identity mapped as
+ * well.
+ */
+ set_phys_range_identity(map[i-1].addr / PAGE_SIZE, ~0ul);
+
+ /*
* In domU, the ISA region is normal, usable memory, but we
* reserve ISA memory anyway because too many things poke
* about in there.
--
1.7.2.5
next prev parent reply other threads:[~2014-02-03 17:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-03 17:01 [PATCHv4 0/8] x86/xen: fixes for mapping high MMIO regions (and remove _PAGE_IOMAP) David Vrabel
2014-02-03 17:01 ` [PATCH 1/8] x86/xen: rename early_p2m_alloc() and early_p2m_alloc_middle() David Vrabel
2014-02-03 17:01 ` [PATCH 2/8] x86/xen: fix set_phys_range_identity() if pfn_e > MAX_P2M_PFN David Vrabel
2014-02-03 17:01 ` [PATCH 3/8] x86/xen: compactly store large identity ranges in the p2m David Vrabel
2014-02-03 17:01 ` [PATCH 4/8] x86/xen: only warn once if bad MFNs are found during setup David Vrabel
2014-02-03 17:01 ` David Vrabel [this message]
2014-02-03 17:01 ` [PATCH 6/8] x86/xen: do not use _PAGE_IOMAP in xen_remap_domain_mfn_range() David Vrabel
2014-02-03 17:01 ` [PATCH 7/8] x86/xen: do not use _PAGE_IOMAP PTE flag for I/O mappings David Vrabel
2014-02-03 17:01 ` [PATCH 8/8] x86: remove the Xen-specific _PAGE_IOMAP PTE flag David Vrabel
2014-02-03 17:17 ` [PATCHv4 0/8] x86/xen: fixes for mapping high MMIO regions (and remove _PAGE_IOMAP) Konrad Rzeszutek Wilk
-- strict thread matches above, loose matches on Subject: below --
2014-02-24 17:39 [PATCHv5 " David Vrabel
2014-02-24 17:39 ` [PATCH 5/8] x86/xen: set regions above the end of RAM as 1:1 David Vrabel
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=1391446897-21998-6-git-send-email-david.vrabel@citrix.com \
--to=david.vrabel@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=hpa@zytor.com \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xen.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).