From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: xen-devel@lists.xenproject.org,
Andrew Cooper <andrew.cooper3@citrix.com>,
Jan Beulich <jbeulich@suse.com>,
jason.andryuk@amd.com, Xenia.Ragiadakou@amd.com,
Alejandro.GarciaVallejo@amd.com
Subject: Re: [RFC] xen/x86: allow overlaps with non-RAM regions
Date: Fri, 4 Apr 2025 12:28:33 +0200 [thread overview]
Message-ID: <Z--0USril0UIhR4R@macbook.lan> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2504031755440.3529306@ubuntu-linux-20-04-desktop>
On Thu, Apr 03, 2025 at 06:01:42PM -0700, Stefano Stabellini wrote:
> 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.
That's weird. (Partially) the reason to not attempt to map such BAR
is that it should already be mapped, because at dom0 creation time all
reserved regions are added to the p2m (see arch_iommu_hwdom_init()).
If that's not the case we should figure out why this reserved region
is not added to dom0 p2m as part of arch_iommu_hwdom_init().
Can you paste the dom0 build output when booted with `iommu=verbose
dom0=pvh,verbose`? Does using `dom0=pvh,verbose,pf-fixup` solve the
boot issue? (and can you paste the output if it does)
The issue with allowing BARs to modify p2m reserved regions is that if
memory decoding is disabled for the PCI device, the BAR will be
unmapped from the p2m, thus creating a hole in the p2m for a reserved
region, which would be undesirable IMO.
Thanks, Roger.
next prev parent reply other threads:[~2025-04-04 10:28 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-04 1:01 [RFC] xen/x86: allow overlaps with non-RAM regions Stefano Stabellini
2025-04-04 8:07 ` Jan Beulich
2025-04-10 20:55 ` Jason Andryuk
2025-04-11 7:56 ` Jan Beulich
2025-04-04 10:28 ` Roger Pau Monné [this message]
2025-04-10 20:55 ` Jason Andryuk
2025-04-11 7:31 ` Roger Pau Monné
2025-04-11 8:07 ` Jan Beulich
2025-04-11 13:45 ` Jason Andryuk
2025-04-14 8:25 ` Roger Pau Monné
2025-04-23 23:51 ` Lira, Victor M
2025-04-24 7:59 ` Roger Pau Monné
2025-04-24 10:15 ` Marek Marczykowski-Górecki
2025-04-24 10:48 ` Roger Pau Monné
2025-04-24 21:19 ` Jason Andryuk
2025-04-24 21:38 ` Lira, Victor M
2025-04-25 9:02 ` Roger Pau Monné
2025-04-25 9:19 ` Jan Beulich
2025-04-25 11:09 ` Roger Pau Monné
2025-04-25 16:47 ` Lira, Victor M
2025-05-12 16:16 ` Roger Pau Monné
2025-05-12 17:55 ` Lira, Victor M
2025-05-15 10:19 ` Roger Pau Monné
2025-05-15 16:24 ` Lira, Victor M
2025-04-11 8:15 ` Jan Beulich
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=Z--0USril0UIhR4R@macbook.lan \
--to=roger.pau@citrix.com \
--cc=Alejandro.GarciaVallejo@amd.com \
--cc=Xenia.Ragiadakou@amd.com \
--cc=andrew.cooper3@citrix.com \
--cc=jason.andryuk@amd.com \
--cc=jbeulich@suse.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.