public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org,
	Juergen Gross <jgross@suse.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Subject: Re: [PATCH 1/3] xen/pci: do not register devices outside of PCI segment scope
Date: Mon, 13 Jan 2025 17:29:26 -0600	[thread overview]
Message-ID: <20250113232926.GA442589@bhelgaas> (raw)
In-Reply-To: <Z4TokbA1s3OyNdjt@macbook.local>

On Mon, Jan 13, 2025 at 11:18:57AM +0100, Roger Pau Monné wrote:
> On Fri, Jan 10, 2025 at 04:21:29PM -0600, Bjorn Helgaas wrote:
> > On Fri, Jan 10, 2025 at 03:01:48PM +0100, Roger Pau Monne wrote:
> > > The PCI segment value is limited to 16 bits, however there are buses like VMD
> > > that fake being part of the PCI topology by adding segment with a number
> > > outside the scope of the PCI firmware specification range (>= 0x10000). The
> > > MCFG ACPI Table "PCI Segment Group Number" field is defined as having a 16 bit
> > > width.
> > >
> > > Attempting to register or manage those devices with Xen would result in errors
> > > at best, or overlaps with existing devices living on the truncated equivalent
> > > segment values.
> > 
> > The ACPI _SEG method (ACPI r6.5, sec 6.5.6) and the corresponding
> > value in the MCFG table (PCI Firmware r3.3, sec 4.1.2) are clearly
> > 16-bit values.
> > 
> > But otherwise, the segment value is pretty much an arbitrary software
> > value, and the kernel works fine with the larger domain values from
> > vmd_find_free_domain(), so this isn't quite enough to explain what the
> > issue with Xen is.
> > 
> > Does Xen truncate the domain to 16 bits or use it to look up something
> > in ACPI?
> 
> In the interface between Xen and Linux the segment field is 16 bit
> width, so with the current interface is not possible to reference
> devices that are past the 0xffff segment.

I think this specific reason (and maybe even struct
physdev_pci_device_add) would be more useful than the ACPI _SEG and
MCFG things, which are not as directly connected here.

Bjorn

  reply	other threads:[~2025-01-13 23:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-10 14:01 [PATCH 0/3] xen: fix usage of devices behind a VMD bridge Roger Pau Monne
2025-01-10 14:01 ` [PATCH 1/3] xen/pci: do not register devices outside of PCI segment scope Roger Pau Monne
2025-01-10 22:21   ` Bjorn Helgaas
2025-01-13  7:20     ` Jan Beulich
2025-01-13 10:18     ` Roger Pau Monné
2025-01-13 23:29       ` Bjorn Helgaas [this message]
2025-01-13  7:17   ` Jan Beulich
2025-01-13 10:13     ` Roger Pau Monné
2025-01-10 14:01 ` [PATCH 2/3] vmd: disable MSI remapping bypass under Xen Roger Pau Monne
2025-01-10 22:25   ` Bjorn Helgaas
2025-01-11  5:02     ` Jonathan Derrick
2025-01-13 10:07       ` Roger Pau Monné
2025-01-13 10:03     ` Roger Pau Monné
2025-01-13 15:11       ` Keith Busch
2025-01-13 16:45         ` Roger Pau Monné
2025-01-13 16:53           ` Keith Busch
2025-01-14 11:03             ` Roger Pau Monné
2025-01-12  2:57   ` kernel test robot
2025-01-10 14:01 ` [PATCH 3/3] pci/msi: remove pci_msi_ignore_mask Roger Pau Monne
2025-01-10 22:30   ` Bjorn Helgaas
2025-01-13 10:25     ` Roger Pau Monné
2025-01-13 23:32       ` Bjorn Helgaas
2025-01-11 11:08   ` kernel test robot
2025-01-11 12:24   ` kernel test robot

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=20250113232926.GA442589@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=roger.pau@citrix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox