[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>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Thu, 24 Apr 2025 17:19:32 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=XObGseISFbDn3fLKRyp6gaJLyL8FnL/Cemzvlv9SZYU=; b=F/rQX1LQQjmUFtTG6xmsXSut1s7NxGWyQwkwzYavAASUv/O7hroScMrjfonhVC1wP3pdG+icHMMc7qRnZbF2xVboVno3NH3JM8Q2TBO7NXTmI+J9Y0c5N9TDRgrl5fhlh/YVrbOdgBv/rM79YjRVj4Mo0u1YVV/YVgFC1n4Nt/mw059yzHvQpijf93LbzcOs5RawZ8m/q5DH+CwrWqxudrgW+cwjtwWJ83woFJu6ffyJpfp2brGI0TfAofloGO+vnyr1iEe7QCnRkTrnV84BFyA9SZwv/yCRnj1zC02DwSrwDPQAfCf8auW/cUPiF9A32SAv6kU4j3khizNW+pb9Vg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UENmW8cwfIPIEJJz/UYVMKoDdK7YgINTXU58Xt6XWzZC/xyGXj02DM9a2cbBGbXeApMKZ26ZlaTDDa8zl+MgkfXzCgnUVTq8zb+3oCTRGxX+GnG3AV5ntd/tUu0k4OQGmPpAeJTtLWJNEa0FhJM5H85TiDpTZtsI9hzEt3TjMjgv3t3PnZXhVc9X9F7z2vRsEeQoTNGOJDMZsn38o0RWvEiLQqo08HylWyp4kotsW2zMd1zTi4Y5dmAntfWKcoSU3J82yydxgxMVkrskoKtfshsJBz9K+XtxuPAUJsW6u3LDvIf1gmg72rbKlCWlVoqCfbHlXPyll6KDzz6qG4DpoQ==
  • Cc: "Lira, Victor M" <VictorM.Lira@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, <Xenia.Ragiadakou@xxxxxxx>, <Alejandro.GarciaVallejo@xxxxxxx>
  • Delivery-date: Thu, 24 Apr 2025 21:19:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2025-04-24 06:48, Roger Pau Monné wrote:
On Thu, Apr 24, 2025 at 12:15:17PM +0200, Marek Marczykowski-Górecki wrote:
On Thu, Apr 24, 2025 at 09:59:00AM +0200, Roger Pau Monné wrote:
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.

You sure? 0xfe910 is outside of [00000fd000, 00000fd2ff].

Oh, did and off-by-one when copying, it should have been:

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
  [00000fd304, 00000febff] RW

Where 0xfe910 is covered by the last range.

This looks like it's okay. You think the somehow the device ranges are unmapped?

I thought the immediate issue is that the e820 marks these addresses reserved. That leads to pci_check_bars()->is_memory_hole() returning false. Stefano's original patch just returned true for non-RAM memory regions and the device worked. That would leave bar->mem rangeset empty, IIUC. Not sure how that would remove mappings though.

That also changes the setting of bar->enabled, but I don't immediately see how that affects mappings.

Regards,
Jason



 


Rackspace

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