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: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Anthony PERARD <anthony.perard@vates.tech>,
	Michal Orzel <michal.orzel@amd.com>,
	Stewart Hildebrand <stewart.hildebrand@amd.com>
Subject: Re: [PATCH v3 2/6] PCI: determine whether a device has extended config space
Date: Thu, 29 Jan 2026 15:09:08 +0100	[thread overview]
Message-ID: <aXtqBEyhPgFSmvZA@Mac.lan> (raw)
In-Reply-To: <99d45a27-ce67-4f10-9883-dba96f055285@suse.com>

On Thu, Jan 29, 2026 at 02:08:27PM +0100, Jan Beulich wrote:
> Legacy PCI devices don't have any extended config space. Reading any part
> thereof may return all ones or other arbitrary data, e.g. in some cases
> base config space contents repeatedly.
> 
> Logic follows Linux 6.19-rc's pci_cfg_space_size(), albeit leveraging our
> determination of device type; in particular some comments are taken
> verbatim from there. Like with Linux'es CONFIG_PCI_QUIRKS, only the alias
> detection logic is covered by the new "pci=no-quirks". The singular access
> at PCI_CFG_SPACE_SIZE is left unconditional.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> Acked-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> The warning near the bottom of pci_check_extcfg() may be issued multiple
> times for a single device now. Should we try to avoid that?
> 
> Note that no vPCI adjustments are done here, but they're going to be
> needed: Whatever requires extended capabilities will need re-
> evaluating / newly establishing / tearing down in case an invocation of
> PHYSDEVOP_pci_mmcfg_reserved alters global state.
> ---
> v3: Add command line (sub-)option.
> v2: Major re-work to also check upon PHYSDEVOP_pci_mmcfg_reserved
>     invocation.
> 
> --- a/docs/misc/xen-command-line.pandoc
> +++ b/docs/misc/xen-command-line.pandoc
> @@ -2009,12 +2009,21 @@ Only effective if CONFIG_PARTIAL_EMULATI
>  behavior.**
>  
>  ### pci
> -    = List of [ serr=<bool>, perr=<bool> ]
> +    = List of [ serr=<bool>, perr=<bool>, quirks=<bool> ]
> +
> +* `serr` and `perr`
>  
>      Default: Signaling left as set by firmware.
>  
> -Override the firmware settings, and explicitly enable or disable the
> -signalling of PCI System and Parity errors.
> +  Override the firmware settings, and explicitly enable or disable the
> +  signalling of PCI System and Parity errors.
> +
> +* `quirks`
> +
> +    Default: `on`
> +
> +  In its negative form, allows to suppress certain quirk workarounds, in case
> +  they cause issues.

Not that I oppose to this, but I've assumed that you would introduce
an option to fallback to the previous behavior where Xen would just
assume extended space to be accessible.

I'm fine with this, just assumed it would be a proper fallback to the
previous behavior (which doesn't make much sense as it's partially
bogus when used with vPCI).

Regards, Roger.


  reply	other threads:[~2026-01-29 14:09 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-29 13:05 [PATCH v3 0/6] (v)PCI: extended capability handling Jan Beulich
2026-01-29 13:07 ` [PATCH v3 1/6] PCI: handle PCI->PCIe bridges as well in free_pdev() Jan Beulich
2026-01-29 13:49   ` Roger Pau Monné
2026-01-29 13:08 ` [PATCH v3 2/6] PCI: determine whether a device has extended config space Jan Beulich
2026-01-29 14:09   ` Roger Pau Monné [this message]
2026-01-29 14:17     ` Jan Beulich
2026-02-02  9:14   ` Jan Beulich
2026-02-02  9:21     ` Roger Pau Monné
2026-01-29 13:08 ` [PATCH v3 3/6] PCI: don't look for ext-caps when there's no extended cfg space Jan Beulich
2026-01-29 13:09 ` [PATCH v3 4/6] vPCI: really no ext-caps without extended config space Jan Beulich
2026-01-29 14:13   ` Roger Pau Monné
2026-01-29 13:10 ` [PATCH v3 5/6] x86/PCI: avoid re-evaluation of extended config space accessibility Jan Beulich
2026-01-29 15:32   ` Roger Pau Monné
2026-01-29 15:47     ` Jan Beulich
2026-02-02  8:51   ` Jan Beulich
2026-02-02  9:14     ` Roger Pau Monné
2026-02-02  9:30       ` Jan Beulich
2026-02-02 10:13         ` Roger Pau Monné
2026-02-02 14:40           ` Jan Beulich
2026-02-02 15:18             ` Roger Pau Monné
2026-02-03 14:48               ` Jan Beulich
2026-02-03 17:19                 ` Roger Pau Monné
2026-02-02 19:25     ` Stewart Hildebrand
2026-01-29 13:10 ` [PATCH v3 6/6] vPCI: re-init extended-capability lists when MMCFG availability changed Jan Beulich
2026-01-29 15:40   ` Roger Pau Monné
2026-01-29 15:54     ` Jan Beulich
2026-01-29 17:41       ` Roger Pau Monné

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=aXtqBEyhPgFSmvZA@Mac.lan \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=sstabellini@kernel.org \
    --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.