[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC] xen/x86: allow overlaps with non-RAM regions



On one Sapphire AMD x86 board, I see this:


(XEN) [0000003943ca6ff2]  [00000000f0000000, 00000000f7ffffff] (reserved)
(XEN) [00000039460886d9]  [00000000fd000000, 00000000ffffffff] (reserved)
[...]
(XEN) [    4.612235] 0000:02:00.0: not mapping BAR [fea00, fea03] invalid 
position


Linux boots fine on this platform but Linux as Dom0 on Xen does not.
This is because the pci_check_bar->is_memory_hole check fails due to the
MMIO region overlapping with the EFI reserved region.

While I think ideally this should not happen, as you can imagine users
are never happy when Linux baremetal boots fine, and Linux on Xen does
not.

This patch fixes the boot issue by relaxing the is_memory_hole check.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>

diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index b294497a14..afb54d6f0f 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -797,6 +797,9 @@ bool is_memory_hole(mfn_t start, mfn_t end)
         if ( !entry->size )
             continue;
 
+        if ( entry->type > 1 )
+            continue;
+
         /* Do not allow overlaps with any memory range. */
         if ( s <= PFN_DOWN(entry->addr + entry->size - 1) &&
              PFN_DOWN(entry->addr) <= e )



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.