public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jonathan Derrick <jonathan.derrick@linux.dev>
Cc: "Bjorn Helgaas" <helgaas@kernel.org>,
	linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org,
	linux-pci@vger.kernel.org,
	"Nirmal Patel" <nirmal.patel@linux.intel.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
	"Rob Herring" <robh@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>
Subject: Re: [PATCH 2/3] vmd: disable MSI remapping bypass under Xen
Date: Mon, 13 Jan 2025 11:07:27 +0100	[thread overview]
Message-ID: <Z4Tl33MHEhgrHg1A@macbook.local> (raw)
In-Reply-To: <bcb30b80-0902-4561-94f9-a6e451702138@linux.dev>

On Fri, Jan 10, 2025 at 10:02:00PM -0700, Jonathan Derrick wrote:
> Hi Bjorn,
> 
> On 1/10/25 3:25 PM, Bjorn Helgaas wrote:
> > Match historical subject line style for prefix and capitalization:
> > 
> >    PCI: vmd: Set devices to D0 before enabling PM L1 Substates
> >    PCI: vmd: Add DID 8086:B06F and 8086:B60B for Intel client SKUs
> >    PCI: vmd: Fix indentation issue in vmd_shutdown()
> > 
> > On Fri, Jan 10, 2025 at 03:01:49PM +0100, Roger Pau Monne wrote:
> > > MSI remapping bypass (directly configuring MSI entries for devices on the VMD
> > > bus) won't work under Xen, as Xen is not aware of devices in such bus, and
> > > hence cannot configure the entries using the pIRQ interface in the PV case, and
> > > in the PVH case traps won't be setup for MSI entries for such devices.
> > > 
> > > Until Xen is aware of devices in the VMD bus prevent the
> > > VMD_FEAT_CAN_BYPASS_MSI_REMAP capability from being used when running as any
> > > kind of Xen guest.
> > 
> > Wrap to fit in 75 columns.
> > 
> > Can you include a hint about *why* Xen is not aware of devices below
> > VMD?  That will help to know whether it's a permanent unfixable
> > situation or something that could be done eventually.
> > 
> I wasn't aware of the Xen issue with VMD but if I had to guess it's probably
> due to the special handling of the downstream device into the dmar table.

Nothing to do with DMAR or IOMMUs, it's just that on a Xen system it
must be Xen the one that configures the MSI entries, and that requires
Xen being aware of the VMD devices and it's MSI or MSI-X
capabilities.

None of this is currently done, as Xen has no visibility at all of
devices behind a VMD bridge because is doesn't even know about VMD
bridges, neither about the exposed ECAM-like region on those
devices.

Thanks, Roger.

  reply	other threads:[~2025-01-13 10:07 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
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é [this message]
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=Z4Tl33MHEhgrHg1A@macbook.local \
    --to=roger.pau@citrix.com \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=jonathan.derrick@linux.dev \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=nirmal.patel@linux.intel.com \
    --cc=robh@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