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

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


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Jason Andryuk <jason.andryuk@xxxxxxx>
  • From: "Lira, Victor M" <VictorM.Lira@xxxxxxx>
  • Date: Wed, 23 Apr 2025 16:51:16 -0700
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yiCEC6EKVnvAQ81GbR2HdCyO+oCiT4lxOo/CuGnsqTc=; b=JilZm1lARWOUrMrhcQZDSdxyjLVj1HHdRBB0GixaxO0dW0ZRtkmh4b4wF9CPH6yfz8qtCFUrT1ItofCoJK4lMReQ/Nke0DytR3asjB9wVXukS8tRAEuuwX7yuvXbQgzn9pAF+vYuilwW9ZNThNzJefIHzodV/Qj1uZp8we6aTMR5boJk5WTDc24J7An1PveuO0u7cE7dHBnXcf5pYSngolgJdmGKGCCMWILioEu+95S0yZNQXmgu+7ogjY/2JpXTOClqisYVGuJqLUmeWXVDr1Zd9e5JaEE27L70xIAd4oclKQdk694xjLEwBk3hQnM4BZyfigQqoKid8K7k9Cl9fA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=exHA6F9L6lh8YzFU51gH1bZgVG1FrrX1sG4i//tdFebXePGAZOle+87CHTdwRsiMagVIDoOVq/MCesE8+llPg+Dg/M9UKIisgqtygntiXAhoqW/kPUDESkXhu2IrE3h8adO17pMGTTvQmEiZWecjvLcUcvn7ePgChrU81LejG7ZnTD6gjP8CvHFvDqnl05DZd41W+ZHIfkQ1JVlMrSyTgjGr+dhcw6zrS8MchqTaWPduUSALRcFG9v1MPusZVUOSCTUKGIr5HjzOpYD4Hpa1mBMxrXiK4EFdMR3pJUM0acYtpDuK7V3+d4dwc1vVdkjVEsoQCmcWspUHUMA7dDfB3g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Xenia.Ragiadakou@xxxxxxx, Alejandro.GarciaVallejo@xxxxxxx
  • Delivery-date: Wed, 23 Apr 2025 23:51:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>



On 4/14/2025 1:25 AM, Roger Pau Monné wrote:
Caution: This message originated from an External Source. Use proper caution 
when opening attachments, clicking links, or responding.



(XEN) [    7.943830] *** Building a PVH Dom0 ***
(XEN) [    7.955960] d0: identity mappings for IOMMU:
(XEN) [    7.965494]  [00000000a0, 00000000ff] RW
(XEN) [    7.974336]  [0000009bff, 0000009fff] RW
(XEN) [    7.983172]  [00000cabc9, 00000cc14c] RW
(XEN) [    7.992049]  [00000cc389, 00000cc389] RW
(XEN) [    8.000890]  [00000cc70a, 00000cd1fe] RW
(XEN) [    8.010065]  [00000ce000, 00000cffff] RW
(XEN) [    8.018904]  [00000fd000, 00000fd2ff] RW
(XEN) [    8.027745]  [00000fd304, 00000febff] RW
(XEN) [    8.036584]  [00000fec02, 00000fedff] RW
(XEN) [    8.045546]  [00000fee01, 00000fffff] RW
(XEN) [    8.054519]  [000080f340, 00008501ff] RW
(XEN) [    8.064135] 0000:02:00.0: not mapping BAR [fea00, fea03] invalid 
position
(XEN) [    8.078698] 0000:03:00.0: not mapping BAR [fe900, fe90f] invalid 
position
(XEN) [    8.093260] 0000:03:00.0: not mapping BAR [fe910, fe913] invalid 
position
(XEN) [    8.107815] 0000:04:00.0: not mapping BAR [fe700, fe77f] invalid 
position
(XEN) [    8.122376] 0000:04:00.3: not mapping BAR [fe500, fe5ff] invalid 
position
(XEN) [    8.136936] 0000:04:00.4: not mapping BAR [fe400, fe4ff] invalid 
position
(XEN) [    8.151498] 0000:05:00.0: not mapping BAR [fe801, fe801] invalid 
position
(XEN) [    8.166056] 0000:05:00.1: not mapping BAR [fe800, fe800] invalid 
position
Note those messages don't imply that the BARs are not mapped in the
dom0 p2m, for example here all the ranges listed as invalid positions
are already mapped into the p2m and covered by the range:

(XEN) [    8.027745]  [00000fd304, 00000febff] RW

[    6.378198] nvme nvme0: pci function 0000:02:00.0
(XEN) [   20.964789] d0v3 unable to fixup memory read from 0xfea0300c size 4: -1
[    6.387692] a(XEN) [   20.981772] d0v3 unable to fixup memory write to 
0xfea03000 size 4: -1
And here the address is somehow not populated in the p2m, despite
being listed as an identity mapped region.  I think the real issue
here is why this address is somehow unmapped from the p2m (or maybe
not even added in the first place?).  Xen does identify it as a region
that must be identity mapped.

It's a fairly wild guess, but can you try if:

https://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=e118fc98e7ae652a188d227bd7ea22f132724150

Makes a difference?  vPCI uses rangesets extensively, so the bug fixed
above could in theory cause unmap operations to remove unintended
regions, and could explain the symptoms you are seeing here.

If that commit doesn't change behavior we would need to figure out why
the identity ranges are either not properly mapped, or unexpectedly
unmapped at a later point.
Hello,

Here is the output from Xen staging built including that commit. The behavior is as before. Is there an existing way to see the physical to machine mappings? I didn't find anything in the Xen diagnostics.
I found the tool xen-mfndump but only PV is supported.

/ # xen-mfndump dump-p2m 0
xc: error: Could not get domain address size (95 = Not supported): Internal error
Could not map domain 0 memory information
/ # xl list
Name                                        ID   Mem VCPUs State   Time(s)
Domain-0                                     0  4095     4 r-----     348.8


Victor

Attachment: xen-staging-efi-overlap.log
Description: Text document


 


Rackspace

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