All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Stewart Hildebrand <stewart.hildebrand@amd.com>,
	Ariadne Conill <ariadne@ariadne.space>,
	Steven Noonan <steven@edera.dev>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH] xen/vpci: zero guest-visible BAR addresses to ensure domU asssigns its own
Date: Wed, 4 Mar 2026 16:46:44 +0100	[thread overview]
Message-ID: <aahT5DCUDFV833oM@macbook.local> (raw)
In-Reply-To: <c7b3174e-83af-48ca-854d-417fbc3be90e@suse.com>

On Thu, Feb 26, 2026 at 08:47:52AM +0100, Jan Beulich wrote:
> On 26.02.2026 03:50, Stewart Hildebrand wrote:
> > On 2/25/26 10:37, Jan Beulich wrote:
> >> On 25.02.2026 00:12, Ariadne Conill wrote:
> >>> From: Steven Noonan <steven@edera.dev>
> >>>
> >>> If we just use the host's BAR addresses, the domU might not attempt to
> >>> reconfigure the BAR ranges and may never try to map them with the IOMMU.
> >>> Zeroing them ensures the guest kernel knows the BARs are not configured
> >>> and needs to make its own choices about where to map the BARs.
> >>
> >> Yet for this, don't we first need to expose a full topology to the guest,
> >> i.e. at least a host bridge, and maybe further bridges?
> > While we eventually do want to expose (a) virtual bridge(s) to vPCI domUs (this
> > work is currently in development), I don't think it's pre-requisite for the code
> > change herein: clearly, leaking host BAR addresses to domUs isn't right, and
> > there's no need to wait to address that.
> > 
> > With that said, the commit title/description don't align well with the code
> > change. Assuming we want to move the code change forward, for v2 of the patch I
> > suggest dropping the 2nd half of the title, and reworking the commit description
> > to focus on describing the code change at hand and less on what the domU might
> > do.
> 
> That would indeed work for me.

+1.  The "try to map them with the IOMMU" wording is not accurate
IMO, and wants replacing.

It would also be nice to mention that zeroing unconditionally is fine,
because for domUs the memory decoding bit is also unconditionally
cleared, so there will be no attempt to map the BARs into the guest
p2m by vpci_init_header().

Thanks, Roger.


      reply	other threads:[~2026-03-04 15:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24 23:12 [PATCH] xen/vpci: zero guest-visible BAR addresses to ensure domU asssigns its own Ariadne Conill
2026-02-25 15:37 ` Jan Beulich
2026-02-26  2:50   ` Stewart Hildebrand
2026-02-26  7:47     ` Jan Beulich
2026-03-04 15:46       ` Roger Pau Monné [this message]

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=aahT5DCUDFV833oM@macbook.local \
    --to=roger.pau@citrix.com \
    --cc=ariadne@ariadne.space \
    --cc=jbeulich@suse.com \
    --cc=steven@edera.dev \
    --cc=stewart.hildebrand@amd.com \
    --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.