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: Anthony PERARD <anthony.perard@vates.tech>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Michal Orzel <michal.orzel@amd.com>,
	Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Juergen Gross <jgross@suse.com>,
	Anthoine Bourgeois <anthoine.bourgeois@vates.tech>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v3] x86/hvmloader: select xenpci MMIO BAR UC or WB MTRR cache attribute
Date: Tue, 10 Jun 2025 18:00:06 +0200	[thread overview]
Message-ID: <aEhWhlU70O-OOpjs@macbook.local> (raw)
In-Reply-To: <bdb0d15b-619e-4ff1-9db5-0beb07683a39@suse.com>

On Tue, Jun 10, 2025 at 05:45:52PM +0200, Jan Beulich wrote:
> On 05.06.2025 18:16, Roger Pau Monne wrote:
> > @@ -271,6 +279,43 @@ void pci_setup(void)
> >              if ( bar_sz == 0 )
> >                  continue;
> >  
> > +            if ( !xenpci_bar_uc &&
> > +                 ((bar_data & PCI_BASE_ADDRESS_SPACE) ==
> > +                   PCI_BASE_ADDRESS_SPACE_MEMORY) &&
> > +                 vendor_id == 0x5853 &&
> > +                 (device_id == 0x0001 || device_id == 0x0002) )
> > +            {
> > +                if ( is_64bar )
> > +                {
> > +                     printf("xenpci dev %02x:%x unexpected MMIO 64bit BAR%u\n",
> > +                            devfn >> 3, devfn & 7, bar);
> > +                     continue;
> > +                }
> > +
> > +                if ( bar_sz > pci_mem_end ||
> > +                     ((pci_mem_end - bar_sz) & ~(bar_sz - 1)) < pci_mem_start )
> > +                {
> > +                     printf("xenpci dev %02x:%x BAR%u size %llx overflows low PCI hole\n",
> > +                            devfn >> 3, devfn & 7, bar, bar_sz);
> > +                     continue;
> > +                }
> 
> Is "continue" really the right way of handling the problem here?

The problem will only appear when using the newly added option.

> We didn't
> skip this BAR prior to your changes just because of either of these being
> true.

I can add a label to keep the previous logic in case the expectations
don't match.

Thanks, Roger.


      reply	other threads:[~2025-06-10 16:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-05 16:16 [PATCH v3] x86/hvmloader: select xenpci MMIO BAR UC or WB MTRR cache attribute Roger Pau Monne
2025-06-06 13:00 ` Tu Dinh
2025-06-06 13:23   ` Roger Pau Monné
2025-06-06 13:37     ` Tu Dinh
2025-06-06 13:41 ` Roger Pau Monné
2025-06-09 10:29   ` Oleksii Kurochko
2025-06-10 15:45 ` Jan Beulich
2025-06-10 16:00   ` 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=aEhWhlU70O-OOpjs@macbook.local \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthoine.bourgeois@vates.tech \
    --cc=anthony.perard@vates.tech \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.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.