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

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



On Wed, Apr 23, 2025 at 04:51:16PM -0700, Lira, Victor M wrote:
> [    4.570354] Intel(R) 2.5G Ethernet Linux Driver
> 
> [    4.579535] Copyright(c) 2018 Intel Corporation.
> 
> [    4.588898] sky2: driver version 1.30
> 
> (XEN) [   21.644361] d0v3 unable to fixup memory read from 0xfe91000c size 4: 
> -1

This fault is unexpected, according to the identity mappings done at
domain build time:

d0: identity mappings for IOMMU:
 [00000000a0, 00000000ff] RW
 [0000009bff, 0000009fff] RW
 [00000cabc9, 00000cc14c] RW
 [00000cc389, 00000cc389] RW
 [00000cc70a, 00000cd1fe] RW
 [00000ce000, 00000cffff] RW
 [00000fd000, 00000fd2ff] RW

The page at 0xfe910 should be covered by the last range above.  I
think we have a bug somewhere that unexpectedly unmaps that address.

Can you try the Xen patch below and paste the output?  It should print
p2m modifications of the 0xfe910 gfn, so we can spot who/when removes
that mapping.

Thanks, Roger.
---
diff --git a/xen/arch/x86/mm/p2m-pt.c b/xen/arch/x86/mm/p2m-pt.c
index 666abd46be16..c4bb2cb01422 100644
--- a/xen/arch/x86/mm/p2m-pt.c
+++ b/xen/arch/x86/mm/p2m-pt.c
@@ -591,6 +591,14 @@ p2m_pt_set_entry(struct p2m_domain *p2m, gfn_t gfn_, mfn_t 
mfn,
     unsigned int flags, iommu_old_flags = 0;
     unsigned long old_mfn = mfn_x(INVALID_MFN);
 
+    if ( is_hardware_domain(d) &&
+         0xfe910 >= gfn && 0xfe910 < gfn + (1 << page_order) )
+    {
+        printk("gfn %#lx mfn %#"PRI_mfn" type %u order %u\n",
+               gfn, mfn_x(mfn), p2mt, page_order);
+        WARN();
+    }
+
     if ( !sve )
         return -EOPNOTSUPP;
 



 


Rackspace

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