* [PATCH v2 0/3] xen: fix usage of devices behind a VMD bridge
@ 2025-01-14 10:33 Roger Pau Monne
2025-01-14 10:33 ` [PATCH v2 1/3] xen/pci: do not register devices with segments >= 0x10000 Roger Pau Monne
` (4 more replies)
0 siblings, 5 replies; 13+ messages in thread
From: Roger Pau Monne @ 2025-01-14 10:33 UTC (permalink / raw)
To: linux-kernel, xen-devel; +Cc: Roger Pau Monne
Hello,
The following series should fix the usage of devices behind a VMD bridge
when running Linux as a Xen PV hardware domain (dom0). I've only been
able to test PV. I think PVH should also work but I don't have hardware
capable of testing it right now.
I don't expect the first two patches to be problematic, the last patch
is likely to be more controversial. I've tested it internally and
didn't see any issues, but my testing of PV mode is mostly limited to
dom0.
Thanks, Roger.
Roger Pau Monne (3):
xen/pci: do not register devices with segments >= 0x10000
vmd: disable MSI remapping bypass under Xen
pci/msi: remove pci_msi_ignore_mask
arch/x86/pci/xen.c | 8 ++------
drivers/pci/controller/vmd.c | 19 ++++++++++++++++++
drivers/pci/msi/msi.c | 37 ++++++++++++++++++++----------------
drivers/xen/pci.c | 19 ++++++++++++++++++
include/linux/msi.h | 3 ++-
kernel/irq/msi.c | 2 +-
6 files changed, 64 insertions(+), 24 deletions(-)
--
2.46.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 1/3] xen/pci: do not register devices with segments >= 0x10000
2025-01-14 10:33 [PATCH v2 0/3] xen: fix usage of devices behind a VMD bridge Roger Pau Monne
@ 2025-01-14 10:33 ` Roger Pau Monne
2025-02-14 17:20 ` Bjorn Helgaas
2025-01-14 10:33 ` [PATCH v2 2/3] vmd: disable MSI remapping bypass under Xen Roger Pau Monne
` (3 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Roger Pau Monne @ 2025-01-14 10:33 UTC (permalink / raw)
To: linux-kernel, xen-devel
Cc: Roger Pau Monne, Juergen Gross, Stefano Stabellini,
Oleksandr Tyshchenko
The current hypercall interface for doing PCI device operations always uses
a segment field that has a 16 bit width. However on Linux there are buses
like VMD that hook up devices into the PCI hierarchy at segment >= 0x10000,
after the maximum possible segment enumerated in ACPI.
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. Note also that the VMD segment numbers are
arbitrarily assigned by the OS, and hence there would need to be some
negotiation between Xen and the OS to agree on how to enumerate VMD
segments and devices behind them.
Skip notifying Xen about those devices. Given how VMD bridges can
multiplex interrupts on behalf of devices behind them there's no need for
Xen to be aware of such devices for them to be usable by Linux.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Changes since v1:
- Adjust commit message width to 75 columns.
- Expand commit message.
---
drivers/xen/pci.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/xen/pci.c b/drivers/xen/pci.c
index 416f231809cb..08e82fd1263e 100644
--- a/drivers/xen/pci.c
+++ b/drivers/xen/pci.c
@@ -43,6 +43,13 @@ static int xen_add_device(struct device *dev)
pci_mcfg_reserved = true;
}
#endif
+
+ if (pci_domain_nr(pci_dev->bus) >> 16) {
+ dev_info(dev,
+ "not registering with Xen: invalid PCI segment\n");
+ return 0;
+ }
+
if (pci_seg_supported) {
DEFINE_RAW_FLEX(struct physdev_pci_device_add, add, optarr, 1);
@@ -149,6 +156,12 @@ static int xen_remove_device(struct device *dev)
int r;
struct pci_dev *pci_dev = to_pci_dev(dev);
+ if (pci_domain_nr(pci_dev->bus) >> 16) {
+ dev_info(dev,
+ "not unregistering with Xen: invalid PCI segment\n");
+ return 0;
+ }
+
if (pci_seg_supported) {
struct physdev_pci_device device = {
.seg = pci_domain_nr(pci_dev->bus),
@@ -182,6 +195,12 @@ int xen_reset_device(const struct pci_dev *dev)
.flags = PCI_DEVICE_RESET_FLR,
};
+ if (pci_domain_nr(dev->bus) >> 16) {
+ dev_info(&dev->dev,
+ "unable to notify Xen of device reset: invalid PCI segment\n");
+ return 0;
+ }
+
return HYPERVISOR_physdev_op(PHYSDEVOP_pci_device_reset, &device);
}
EXPORT_SYMBOL_GPL(xen_reset_device);
--
2.46.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 2/3] vmd: disable MSI remapping bypass under Xen
2025-01-14 10:33 [PATCH v2 0/3] xen: fix usage of devices behind a VMD bridge Roger Pau Monne
2025-01-14 10:33 ` [PATCH v2 1/3] xen/pci: do not register devices with segments >= 0x10000 Roger Pau Monne
@ 2025-01-14 10:33 ` Roger Pau Monne
2025-02-14 17:23 ` Bjorn Helgaas
2025-01-14 10:33 ` [PATCH v2 3/3] pci/msi: remove pci_msi_ignore_mask Roger Pau Monne
` (2 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Roger Pau Monne @ 2025-01-14 10:33 UTC (permalink / raw)
To: linux-kernel, xen-devel, linux-pci
Cc: Roger Pau Monne, Nirmal Patel, Jonathan Derrick,
Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas
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.
The MSI remapping bypass is an optional feature of VMD bridges, and hence
when running under Xen it will be masked and devices will be forced to
redirect its interrupts from the VMD bridge. That mode of operation must
always be supported by VMD bridges and works when Xen is not aware of
devices behind the VMD bridge.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Changes since v1:
- Add xen header.
- Expand comment.
---
drivers/pci/controller/vmd.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index 264a180403a0..33c9514bd926 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -17,6 +17,8 @@
#include <linux/rculist.h>
#include <linux/rcupdate.h>
+#include <xen/xen.h>
+
#include <asm/irqdomain.h>
#define VMD_CFGBAR 0
@@ -965,6 +967,23 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)
struct vmd_dev *vmd;
int err;
+ if (xen_domain())
+ /*
+ * Xen doesn't have knowledge about devices in the VMD bus
+ * because the config space of devices behind the VMD bridge is
+ * not known to Xen, and hence Xen cannot discover or configure
+ * them in any way.
+ *
+ * Bypass of MSI remapping won't work in that case as direct
+ * write by Linux to the MSI entries won't result in functional
+ * interrupts, as it's Xen the entity that manages the host
+ * interrupt controller and must configure interrupts.
+ * However multiplexing of interrupts by the VMD bridge will
+ * work under Xen, so force the usage of that mode which must
+ * always be supported by VMD bridges.
+ */
+ features &= ~VMD_FEAT_CAN_BYPASS_MSI_REMAP;
+
if (resource_size(&dev->resource[VMD_CFGBAR]) < (1 << 20))
return -ENOMEM;
--
2.46.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 3/3] pci/msi: remove pci_msi_ignore_mask
2025-01-14 10:33 [PATCH v2 0/3] xen: fix usage of devices behind a VMD bridge Roger Pau Monne
2025-01-14 10:33 ` [PATCH v2 1/3] xen/pci: do not register devices with segments >= 0x10000 Roger Pau Monne
2025-01-14 10:33 ` [PATCH v2 2/3] vmd: disable MSI remapping bypass under Xen Roger Pau Monne
@ 2025-01-14 10:33 ` Roger Pau Monne
2025-02-05 15:17 ` Bjorn Helgaas
2025-02-05 14:37 ` [PATCH v2 0/3] xen: fix usage of devices behind a VMD bridge Roger Pau Monné
2025-02-14 17:17 ` Bjorn Helgaas
4 siblings, 1 reply; 13+ messages in thread
From: Roger Pau Monne @ 2025-01-14 10:33 UTC (permalink / raw)
To: linux-kernel, xen-devel, linux-pci
Cc: Roger Pau Monne, Juergen Gross, Bjorn Helgaas, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin
Setting pci_msi_ignore_mask inhibits the toggling of the mask bit for both
MSI and MSI-X entries globally, regardless of the IRQ chip they are using.
Only Xen sets the pci_msi_ignore_mask when routing physical interrupts over
event channels, to prevent PCI code from attempting to toggle the maskbit,
as it's Xen that controls the bit.
However, the pci_msi_ignore_mask being global will affect devices that use
MSI interrupts but are not routing those interrupts over event channels
(not using the Xen pIRQ chip). One example is devices behind a VMD PCI
bridge. In that scenario the VMD bridge configures MSI(-X) using the
normal IRQ chip (the pIRQ one in the Xen case), and devices behind the
bridge configure the MSI entries using indexes into the VMD bridge MSI
table. The VMD bridge then demultiplexes such interrupts and delivers to
the destination device(s). Having pci_msi_ignore_mask set in that scenario
prevents (un)masking of MSI entries for devices behind the VMD bridge.
Move the signaling of no entry masking into the MSI domain flags, as that
allows setting it on a per-domain basis. Set it for the Xen MSI domain
that uses the pIRQ chip, while leaving it unset for the rest of the
cases.
Remove pci_msi_ignore_mask at once, since it was only used by Xen code, and
with Xen dropping usage the variable is unneeded.
This fixes using devices behind a VMD bridge on Xen PV hardware domains.
Albeit Devices behind a VMD bridge are not known to Xen, that doesn't mean
Linux cannot use them. By inhibiting the usage of
VMD_FEAT_CAN_BYPASS_MSI_REMAP and the removal of the pci_msi_ignore_mask
bodge devices behind a VMD bridge do work fine when use from a Linux Xen
hardware domain. That's the whole point of the series.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Changes since v1:
- Fix build.
- Expand commit message.
---
arch/x86/pci/xen.c | 8 ++------
drivers/pci/msi/msi.c | 37 +++++++++++++++++++++----------------
include/linux/msi.h | 3 ++-
kernel/irq/msi.c | 2 +-
4 files changed, 26 insertions(+), 24 deletions(-)
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
index 0f2fe524f60d..b8755cde2419 100644
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -436,7 +436,8 @@ static struct msi_domain_ops xen_pci_msi_domain_ops = {
};
static struct msi_domain_info xen_pci_msi_domain_info = {
- .flags = MSI_FLAG_PCI_MSIX | MSI_FLAG_FREE_MSI_DESCS | MSI_FLAG_DEV_SYSFS,
+ .flags = MSI_FLAG_PCI_MSIX | MSI_FLAG_FREE_MSI_DESCS |
+ MSI_FLAG_DEV_SYSFS | MSI_FLAG_NO_MASK,
.ops = &xen_pci_msi_domain_ops,
};
@@ -484,11 +485,6 @@ static __init void xen_setup_pci_msi(void)
* in allocating the native domain and never use it.
*/
x86_init.irqs.create_pci_msi_domain = xen_create_pci_msi_domain;
- /*
- * With XEN PIRQ/Eventchannels in use PCI/MSI[-X] masking is solely
- * controlled by the hypervisor.
- */
- pci_msi_ignore_mask = 1;
}
#else /* CONFIG_PCI_MSI */
diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c
index 3a45879d85db..dcbb4f9ac578 100644
--- a/drivers/pci/msi/msi.c
+++ b/drivers/pci/msi/msi.c
@@ -10,12 +10,12 @@
#include <linux/err.h>
#include <linux/export.h>
#include <linux/irq.h>
+#include <linux/irqdomain.h>
#include "../pci.h"
#include "msi.h"
int pci_msi_enable = 1;
-int pci_msi_ignore_mask;
/**
* pci_msi_supported - check whether MSI may be enabled on a device
@@ -285,6 +285,8 @@ static void pci_msi_set_enable(struct pci_dev *dev, int enable)
static int msi_setup_msi_desc(struct pci_dev *dev, int nvec,
struct irq_affinity_desc *masks)
{
+ const struct irq_domain *d = dev_get_msi_domain(&dev->dev);
+ const struct msi_domain_info *info = d->host_data;
struct msi_desc desc;
u16 control;
@@ -295,8 +297,7 @@ static int msi_setup_msi_desc(struct pci_dev *dev, int nvec,
/* Lies, damned lies, and MSIs */
if (dev->dev_flags & PCI_DEV_FLAGS_HAS_MSI_MASKING)
control |= PCI_MSI_FLAGS_MASKBIT;
- /* Respect XEN's mask disabling */
- if (pci_msi_ignore_mask)
+ if (info->flags & MSI_FLAG_NO_MASK)
control &= ~PCI_MSI_FLAGS_MASKBIT;
desc.nvec_used = nvec;
@@ -600,12 +601,15 @@ static void __iomem *msix_map_region(struct pci_dev *dev,
*/
void msix_prepare_msi_desc(struct pci_dev *dev, struct msi_desc *desc)
{
+ const struct irq_domain *d = dev_get_msi_domain(&dev->dev);
+ const struct msi_domain_info *info = d->host_data;
+
desc->nvec_used = 1;
desc->pci.msi_attrib.is_msix = 1;
desc->pci.msi_attrib.is_64 = 1;
desc->pci.msi_attrib.default_irq = dev->irq;
desc->pci.mask_base = dev->msix_base;
- desc->pci.msi_attrib.can_mask = !pci_msi_ignore_mask &&
+ desc->pci.msi_attrib.can_mask = !(info->flags & MSI_FLAG_NO_MASK) &&
!desc->pci.msi_attrib.is_virtual;
if (desc->pci.msi_attrib.can_mask) {
@@ -655,9 +659,6 @@ static void msix_mask_all(void __iomem *base, int tsize)
u32 ctrl = PCI_MSIX_ENTRY_CTRL_MASKBIT;
int i;
- if (pci_msi_ignore_mask)
- return;
-
for (i = 0; i < tsize; i++, base += PCI_MSIX_ENTRY_SIZE)
writel(ctrl, base + PCI_MSIX_ENTRY_VECTOR_CTRL);
}
@@ -710,6 +711,8 @@ static int msix_setup_interrupts(struct pci_dev *dev, struct msix_entry *entries
static int msix_capability_init(struct pci_dev *dev, struct msix_entry *entries,
int nvec, struct irq_affinity *affd)
{
+ const struct irq_domain *d = dev_get_msi_domain(&dev->dev);
+ const struct msi_domain_info *info = d->host_data;
int ret, tsize;
u16 control;
@@ -740,15 +743,17 @@ static int msix_capability_init(struct pci_dev *dev, struct msix_entry *entries,
/* Disable INTX */
pci_intx_for_msi(dev, 0);
- /*
- * Ensure that all table entries are masked to prevent
- * stale entries from firing in a crash kernel.
- *
- * Done late to deal with a broken Marvell NVME device
- * which takes the MSI-X mask bits into account even
- * when MSI-X is disabled, which prevents MSI delivery.
- */
- msix_mask_all(dev->msix_base, tsize);
+ if (!(info->flags & MSI_FLAG_NO_MASK)) {
+ /*
+ * Ensure that all table entries are masked to prevent
+ * stale entries from firing in a crash kernel.
+ *
+ * Done late to deal with a broken Marvell NVME device
+ * which takes the MSI-X mask bits into account even
+ * when MSI-X is disabled, which prevents MSI delivery.
+ */
+ msix_mask_all(dev->msix_base, tsize);
+ }
pci_msix_clear_and_set_ctrl(dev, PCI_MSIX_FLAGS_MASKALL, 0);
pcibios_free_irq(dev);
diff --git a/include/linux/msi.h b/include/linux/msi.h
index b10093c4d00e..59a421fc42bf 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -73,7 +73,6 @@ struct msi_msg {
};
};
-extern int pci_msi_ignore_mask;
/* Helper functions */
struct msi_desc;
struct pci_dev;
@@ -556,6 +555,8 @@ enum {
MSI_FLAG_PCI_MSIX_ALLOC_DYN = (1 << 20),
/* PCI MSIs cannot be steered separately to CPU cores */
MSI_FLAG_NO_AFFINITY = (1 << 21),
+ /* Inhibit usage of entry masking */
+ MSI_FLAG_NO_MASK = (1 << 22),
};
/**
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index 396a067a8a56..7682c36cbccc 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -1143,7 +1143,7 @@ static bool msi_check_reservation_mode(struct irq_domain *domain,
if (!(info->flags & MSI_FLAG_MUST_REACTIVATE))
return false;
- if (IS_ENABLED(CONFIG_PCI_MSI) && pci_msi_ignore_mask)
+ if (info->flags & MSI_FLAG_NO_MASK)
return false;
/*
--
2.46.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH v2 0/3] xen: fix usage of devices behind a VMD bridge
2025-01-14 10:33 [PATCH v2 0/3] xen: fix usage of devices behind a VMD bridge Roger Pau Monne
` (2 preceding siblings ...)
2025-01-14 10:33 ` [PATCH v2 3/3] pci/msi: remove pci_msi_ignore_mask Roger Pau Monne
@ 2025-02-05 14:37 ` Roger Pau Monné
2025-02-14 17:17 ` Bjorn Helgaas
4 siblings, 0 replies; 13+ messages in thread
From: Roger Pau Monné @ 2025-02-05 14:37 UTC (permalink / raw)
To: Juergen Gross, Stefano Stabellini, Oleksandr Tyshchenko,
Nirmal Patel, Jonathan Derrick, Lorenzo Pieralisi,
Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
Bjorn Helgaas, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, x86, H. Peter Anvin
Cc: linux-kernel, xen-devel
Ping? This has been pending for 3 weeks without replies.
Thanks, Roger.
On Tue, Jan 14, 2025 at 11:33:10AM +0100, Roger Pau Monne wrote:
> Hello,
>
> The following series should fix the usage of devices behind a VMD bridge
> when running Linux as a Xen PV hardware domain (dom0). I've only been
> able to test PV. I think PVH should also work but I don't have hardware
> capable of testing it right now.
>
> I don't expect the first two patches to be problematic, the last patch
> is likely to be more controversial. I've tested it internally and
> didn't see any issues, but my testing of PV mode is mostly limited to
> dom0.
>
> Thanks, Roger.
>
> Roger Pau Monne (3):
> xen/pci: do not register devices with segments >= 0x10000
> vmd: disable MSI remapping bypass under Xen
> pci/msi: remove pci_msi_ignore_mask
>
> arch/x86/pci/xen.c | 8 ++------
> drivers/pci/controller/vmd.c | 19 ++++++++++++++++++
> drivers/pci/msi/msi.c | 37 ++++++++++++++++++++----------------
> drivers/xen/pci.c | 19 ++++++++++++++++++
> include/linux/msi.h | 3 ++-
> kernel/irq/msi.c | 2 +-
> 6 files changed, 64 insertions(+), 24 deletions(-)
>
> --
> 2.46.0
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 3/3] pci/msi: remove pci_msi_ignore_mask
2025-01-14 10:33 ` [PATCH v2 3/3] pci/msi: remove pci_msi_ignore_mask Roger Pau Monne
@ 2025-02-05 15:17 ` Bjorn Helgaas
2025-02-06 8:33 ` Roger Pau Monné
2025-02-14 11:53 ` Thomas Gleixner
0 siblings, 2 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2025-02-05 15:17 UTC (permalink / raw)
To: Roger Pau Monne
Cc: linux-kernel, xen-devel, linux-pci, Juergen Gross, Bjorn Helgaas,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H. Peter Anvin
Please run git log --oneline and match the subject line capitalization
style, i.e.,
PCI/MSI: Remove ...
But it doesn't look like this actually *removes* the functionality, it
just implements it differently so it can be applied more selectively.
So maybe the subject should say something like "control use of MSI
masking per IRQ domain, not globally"
On Tue, Jan 14, 2025 at 11:33:13AM +0100, Roger Pau Monne wrote:
> Setting pci_msi_ignore_mask inhibits the toggling of the mask bit for both
> MSI and MSI-X entries globally, regardless of the IRQ chip they are using.
> Only Xen sets the pci_msi_ignore_mask when routing physical interrupts over
> event channels, to prevent PCI code from attempting to toggle the maskbit,
> as it's Xen that controls the bit.
>
> However, the pci_msi_ignore_mask being global will affect devices that use
> MSI interrupts but are not routing those interrupts over event channels
> (not using the Xen pIRQ chip). One example is devices behind a VMD PCI
> bridge. In that scenario the VMD bridge configures MSI(-X) using the
> normal IRQ chip (the pIRQ one in the Xen case), and devices behind the
> bridge configure the MSI entries using indexes into the VMD bridge MSI
> table. The VMD bridge then demultiplexes such interrupts and delivers to
> the destination device(s). Having pci_msi_ignore_mask set in that scenario
> prevents (un)masking of MSI entries for devices behind the VMD bridge.
>
> Move the signaling of no entry masking into the MSI domain flags, as that
> allows setting it on a per-domain basis. Set it for the Xen MSI domain
> that uses the pIRQ chip, while leaving it unset for the rest of the
> cases.
>
> Remove pci_msi_ignore_mask at once, since it was only used by Xen code, and
> with Xen dropping usage the variable is unneeded.
>
> This fixes using devices behind a VMD bridge on Xen PV hardware domains.
>
> Albeit Devices behind a VMD bridge are not known to Xen, that doesn't mean
> Linux cannot use them. By inhibiting the usage of
> VMD_FEAT_CAN_BYPASS_MSI_REMAP and the removal of the pci_msi_ignore_mask
> bodge devices behind a VMD bridge do work fine when use from a Linux Xen
> hardware domain. That's the whole point of the series.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Needs an ack from Thomas.
> ---
> Changes since v1:
> - Fix build.
> - Expand commit message.
> ---
> arch/x86/pci/xen.c | 8 ++------
> drivers/pci/msi/msi.c | 37 +++++++++++++++++++++----------------
> include/linux/msi.h | 3 ++-
> kernel/irq/msi.c | 2 +-
> 4 files changed, 26 insertions(+), 24 deletions(-)
>
> diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
> index 0f2fe524f60d..b8755cde2419 100644
> --- a/arch/x86/pci/xen.c
> +++ b/arch/x86/pci/xen.c
> @@ -436,7 +436,8 @@ static struct msi_domain_ops xen_pci_msi_domain_ops = {
> };
>
> static struct msi_domain_info xen_pci_msi_domain_info = {
> - .flags = MSI_FLAG_PCI_MSIX | MSI_FLAG_FREE_MSI_DESCS | MSI_FLAG_DEV_SYSFS,
> + .flags = MSI_FLAG_PCI_MSIX | MSI_FLAG_FREE_MSI_DESCS |
> + MSI_FLAG_DEV_SYSFS | MSI_FLAG_NO_MASK,
> .ops = &xen_pci_msi_domain_ops,
> };
>
> @@ -484,11 +485,6 @@ static __init void xen_setup_pci_msi(void)
> * in allocating the native domain and never use it.
> */
> x86_init.irqs.create_pci_msi_domain = xen_create_pci_msi_domain;
> - /*
> - * With XEN PIRQ/Eventchannels in use PCI/MSI[-X] masking is solely
> - * controlled by the hypervisor.
> - */
> - pci_msi_ignore_mask = 1;
> }
>
> #else /* CONFIG_PCI_MSI */
> diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c
> index 3a45879d85db..dcbb4f9ac578 100644
> --- a/drivers/pci/msi/msi.c
> +++ b/drivers/pci/msi/msi.c
> @@ -10,12 +10,12 @@
> #include <linux/err.h>
> #include <linux/export.h>
> #include <linux/irq.h>
> +#include <linux/irqdomain.h>
>
> #include "../pci.h"
> #include "msi.h"
>
> int pci_msi_enable = 1;
> -int pci_msi_ignore_mask;
>
> /**
> * pci_msi_supported - check whether MSI may be enabled on a device
> @@ -285,6 +285,8 @@ static void pci_msi_set_enable(struct pci_dev *dev, int enable)
> static int msi_setup_msi_desc(struct pci_dev *dev, int nvec,
> struct irq_affinity_desc *masks)
> {
> + const struct irq_domain *d = dev_get_msi_domain(&dev->dev);
> + const struct msi_domain_info *info = d->host_data;
> struct msi_desc desc;
> u16 control;
>
> @@ -295,8 +297,7 @@ static int msi_setup_msi_desc(struct pci_dev *dev, int nvec,
> /* Lies, damned lies, and MSIs */
> if (dev->dev_flags & PCI_DEV_FLAGS_HAS_MSI_MASKING)
> control |= PCI_MSI_FLAGS_MASKBIT;
> - /* Respect XEN's mask disabling */
> - if (pci_msi_ignore_mask)
> + if (info->flags & MSI_FLAG_NO_MASK)
> control &= ~PCI_MSI_FLAGS_MASKBIT;
>
> desc.nvec_used = nvec;
> @@ -600,12 +601,15 @@ static void __iomem *msix_map_region(struct pci_dev *dev,
> */
> void msix_prepare_msi_desc(struct pci_dev *dev, struct msi_desc *desc)
> {
> + const struct irq_domain *d = dev_get_msi_domain(&dev->dev);
> + const struct msi_domain_info *info = d->host_data;
> +
> desc->nvec_used = 1;
> desc->pci.msi_attrib.is_msix = 1;
> desc->pci.msi_attrib.is_64 = 1;
> desc->pci.msi_attrib.default_irq = dev->irq;
> desc->pci.mask_base = dev->msix_base;
> - desc->pci.msi_attrib.can_mask = !pci_msi_ignore_mask &&
> + desc->pci.msi_attrib.can_mask = !(info->flags & MSI_FLAG_NO_MASK) &&
> !desc->pci.msi_attrib.is_virtual;
>
> if (desc->pci.msi_attrib.can_mask) {
> @@ -655,9 +659,6 @@ static void msix_mask_all(void __iomem *base, int tsize)
> u32 ctrl = PCI_MSIX_ENTRY_CTRL_MASKBIT;
> int i;
>
> - if (pci_msi_ignore_mask)
> - return;
> -
> for (i = 0; i < tsize; i++, base += PCI_MSIX_ENTRY_SIZE)
> writel(ctrl, base + PCI_MSIX_ENTRY_VECTOR_CTRL);
> }
> @@ -710,6 +711,8 @@ static int msix_setup_interrupts(struct pci_dev *dev, struct msix_entry *entries
> static int msix_capability_init(struct pci_dev *dev, struct msix_entry *entries,
> int nvec, struct irq_affinity *affd)
> {
> + const struct irq_domain *d = dev_get_msi_domain(&dev->dev);
> + const struct msi_domain_info *info = d->host_data;
> int ret, tsize;
> u16 control;
>
> @@ -740,15 +743,17 @@ static int msix_capability_init(struct pci_dev *dev, struct msix_entry *entries,
> /* Disable INTX */
> pci_intx_for_msi(dev, 0);
>
> - /*
> - * Ensure that all table entries are masked to prevent
> - * stale entries from firing in a crash kernel.
> - *
> - * Done late to deal with a broken Marvell NVME device
> - * which takes the MSI-X mask bits into account even
> - * when MSI-X is disabled, which prevents MSI delivery.
> - */
> - msix_mask_all(dev->msix_base, tsize);
> + if (!(info->flags & MSI_FLAG_NO_MASK)) {
> + /*
> + * Ensure that all table entries are masked to prevent
> + * stale entries from firing in a crash kernel.
> + *
> + * Done late to deal with a broken Marvell NVME device
> + * which takes the MSI-X mask bits into account even
> + * when MSI-X is disabled, which prevents MSI delivery.
> + */
> + msix_mask_all(dev->msix_base, tsize);
> + }
> pci_msix_clear_and_set_ctrl(dev, PCI_MSIX_FLAGS_MASKALL, 0);
>
> pcibios_free_irq(dev);
> diff --git a/include/linux/msi.h b/include/linux/msi.h
> index b10093c4d00e..59a421fc42bf 100644
> --- a/include/linux/msi.h
> +++ b/include/linux/msi.h
> @@ -73,7 +73,6 @@ struct msi_msg {
> };
> };
>
> -extern int pci_msi_ignore_mask;
> /* Helper functions */
> struct msi_desc;
> struct pci_dev;
> @@ -556,6 +555,8 @@ enum {
> MSI_FLAG_PCI_MSIX_ALLOC_DYN = (1 << 20),
> /* PCI MSIs cannot be steered separately to CPU cores */
> MSI_FLAG_NO_AFFINITY = (1 << 21),
> + /* Inhibit usage of entry masking */
> + MSI_FLAG_NO_MASK = (1 << 22),
> };
>
> /**
> diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
> index 396a067a8a56..7682c36cbccc 100644
> --- a/kernel/irq/msi.c
> +++ b/kernel/irq/msi.c
> @@ -1143,7 +1143,7 @@ static bool msi_check_reservation_mode(struct irq_domain *domain,
> if (!(info->flags & MSI_FLAG_MUST_REACTIVATE))
> return false;
>
> - if (IS_ENABLED(CONFIG_PCI_MSI) && pci_msi_ignore_mask)
> + if (info->flags & MSI_FLAG_NO_MASK)
> return false;
>
> /*
> --
> 2.46.0
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 3/3] pci/msi: remove pci_msi_ignore_mask
2025-02-05 15:17 ` Bjorn Helgaas
@ 2025-02-06 8:33 ` Roger Pau Monné
2025-02-06 16:02 ` Bjorn Helgaas
2025-02-14 11:53 ` Thomas Gleixner
1 sibling, 1 reply; 13+ messages in thread
From: Roger Pau Monné @ 2025-02-06 8:33 UTC (permalink / raw)
To: Bjorn Helgaas, Thomas Gleixner
Cc: linux-kernel, xen-devel, linux-pci, Juergen Gross, Bjorn Helgaas,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin
On Wed, Feb 05, 2025 at 09:17:31AM -0600, Bjorn Helgaas wrote:
> Please run git log --oneline and match the subject line capitalization
> style, i.e.,
>
> PCI/MSI: Remove ...
>
> But it doesn't look like this actually *removes* the functionality, it
> just implements it differently so it can be applied more selectively.
>
> So maybe the subject should say something like "control use of MSI
> masking per IRQ domain, not globally"
What about:
PCI/MSI: convert pci_msi_ignore_mask to per MSI domain flag
Which is slightly shorter?
>
> On Tue, Jan 14, 2025 at 11:33:13AM +0100, Roger Pau Monne wrote:
> > Setting pci_msi_ignore_mask inhibits the toggling of the mask bit for both
> > MSI and MSI-X entries globally, regardless of the IRQ chip they are using.
> > Only Xen sets the pci_msi_ignore_mask when routing physical interrupts over
> > event channels, to prevent PCI code from attempting to toggle the maskbit,
> > as it's Xen that controls the bit.
> >
> > However, the pci_msi_ignore_mask being global will affect devices that use
> > MSI interrupts but are not routing those interrupts over event channels
> > (not using the Xen pIRQ chip). One example is devices behind a VMD PCI
> > bridge. In that scenario the VMD bridge configures MSI(-X) using the
> > normal IRQ chip (the pIRQ one in the Xen case), and devices behind the
> > bridge configure the MSI entries using indexes into the VMD bridge MSI
> > table. The VMD bridge then demultiplexes such interrupts and delivers to
> > the destination device(s). Having pci_msi_ignore_mask set in that scenario
> > prevents (un)masking of MSI entries for devices behind the VMD bridge.
> >
> > Move the signaling of no entry masking into the MSI domain flags, as that
> > allows setting it on a per-domain basis. Set it for the Xen MSI domain
> > that uses the pIRQ chip, while leaving it unset for the rest of the
> > cases.
> >
> > Remove pci_msi_ignore_mask at once, since it was only used by Xen code, and
> > with Xen dropping usage the variable is unneeded.
> >
> > This fixes using devices behind a VMD bridge on Xen PV hardware domains.
> >
> > Albeit Devices behind a VMD bridge are not known to Xen, that doesn't mean
> > Linux cannot use them. By inhibiting the usage of
> > VMD_FEAT_CAN_BYPASS_MSI_REMAP and the removal of the pci_msi_ignore_mask
> > bodge devices behind a VMD bridge do work fine when use from a Linux Xen
> > hardware domain. That's the whole point of the series.
> >
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>
> Needs an ack from Thomas.
Thanks, moved him to the 'To:' field.
Regards, Roger.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 3/3] pci/msi: remove pci_msi_ignore_mask
2025-02-06 8:33 ` Roger Pau Monné
@ 2025-02-06 16:02 ` Bjorn Helgaas
0 siblings, 0 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2025-02-06 16:02 UTC (permalink / raw)
To: Roger Pau Monné
Cc: Thomas Gleixner, linux-kernel, xen-devel, linux-pci,
Juergen Gross, Bjorn Helgaas, Ingo Molnar, Borislav Petkov,
Dave Hansen, x86, H. Peter Anvin
On Thu, Feb 06, 2025 at 09:33:26AM +0100, Roger Pau Monné wrote:
> On Wed, Feb 05, 2025 at 09:17:31AM -0600, Bjorn Helgaas wrote:
> > Please run git log --oneline and match the subject line capitalization
> > style, i.e.,
> >
> > PCI/MSI: Remove ...
> >
> > But it doesn't look like this actually *removes* the functionality, it
> > just implements it differently so it can be applied more selectively.
> >
> > So maybe the subject should say something like "control use of MSI
> > masking per IRQ domain, not globally"
>
> What about:
>
> PCI/MSI: convert pci_msi_ignore_mask to per MSI domain flag
>
> Which is slightly shorter?
Much better. Also capitalize "Convert".
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 3/3] pci/msi: remove pci_msi_ignore_mask
2025-02-05 15:17 ` Bjorn Helgaas
2025-02-06 8:33 ` Roger Pau Monné
@ 2025-02-14 11:53 ` Thomas Gleixner
1 sibling, 0 replies; 13+ messages in thread
From: Thomas Gleixner @ 2025-02-14 11:53 UTC (permalink / raw)
To: Bjorn Helgaas, Roger Pau Monne
Cc: linux-kernel, xen-devel, linux-pci, Juergen Gross, Bjorn Helgaas,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin
On Wed, Feb 05 2025 at 09:17, Bjorn Helgaas wrote:
>> Albeit Devices behind a VMD bridge are not known to Xen, that doesn't mean
>> Linux cannot use them. By inhibiting the usage of
>> VMD_FEAT_CAN_BYPASS_MSI_REMAP and the removal of the pci_msi_ignore_mask
>> bodge devices behind a VMD bridge do work fine when use from a Linux Xen
>> hardware domain. That's the whole point of the series.
>>
>> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>
> Needs an ack from Thomas.
No objections from my side (aside of your change log comments).
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 0/3] xen: fix usage of devices behind a VMD bridge
2025-01-14 10:33 [PATCH v2 0/3] xen: fix usage of devices behind a VMD bridge Roger Pau Monne
` (3 preceding siblings ...)
2025-02-05 14:37 ` [PATCH v2 0/3] xen: fix usage of devices behind a VMD bridge Roger Pau Monné
@ 2025-02-14 17:17 ` Bjorn Helgaas
2025-02-14 18:46 ` Jürgen Groß
4 siblings, 1 reply; 13+ messages in thread
From: Bjorn Helgaas @ 2025-02-14 17:17 UTC (permalink / raw)
To: Roger Pau Monne, Juergen Gross, Nirmal Patel
Cc: linux-kernel, xen-devel, Jonathan Derrick
[+to Juergen, Nirmal, +cc Jonathan]
On Tue, Jan 14, 2025 at 11:33:10AM +0100, Roger Pau Monne wrote:
> Hello,
>
> The following series should fix the usage of devices behind a VMD bridge
> when running Linux as a Xen PV hardware domain (dom0). I've only been
> able to test PV. I think PVH should also work but I don't have hardware
> capable of testing it right now.
>
> I don't expect the first two patches to be problematic, the last patch
> is likely to be more controversial. I've tested it internally and
> didn't see any issues, but my testing of PV mode is mostly limited to
> dom0.
>
> Thanks, Roger.
>
> Roger Pau Monne (3):
> xen/pci: do not register devices with segments >= 0x10000
> vmd: disable MSI remapping bypass under Xen
> pci/msi: remove pci_msi_ignore_mask
>
> arch/x86/pci/xen.c | 8 ++------
> drivers/pci/controller/vmd.c | 19 ++++++++++++++++++
> drivers/pci/msi/msi.c | 37 ++++++++++++++++++++----------------
> drivers/xen/pci.c | 19 ++++++++++++++++++
> include/linux/msi.h | 3 ++-
> kernel/irq/msi.c | 2 +-
> 6 files changed, 64 insertions(+), 24 deletions(-)
We got an ack from Thomas, so I'm fine with this from a PCI
perspective. How should it be merged? Via Xen or PCI? I'm happy to
merge via PCI, but would also want acks from Juergen for the Xen
piece and Nirmal for the VMD piece.
I have a couple more trivial comments, will respond to those patches.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/3] xen/pci: do not register devices with segments >= 0x10000
2025-01-14 10:33 ` [PATCH v2 1/3] xen/pci: do not register devices with segments >= 0x10000 Roger Pau Monne
@ 2025-02-14 17:20 ` Bjorn Helgaas
0 siblings, 0 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2025-02-14 17:20 UTC (permalink / raw)
To: Roger Pau Monne
Cc: linux-kernel, xen-devel, Juergen Gross, Stefano Stabellini,
Oleksandr Tyshchenko
It looks like the convention for this file is to capitalize the
subject, e.g.,
xen/pci: Do not register ...
On Tue, Jan 14, 2025 at 11:33:11AM +0100, Roger Pau Monne wrote:
> The current hypercall interface for doing PCI device operations always uses
> a segment field that has a 16 bit width. However on Linux there are buses
> like VMD that hook up devices into the PCI hierarchy at segment >= 0x10000,
> after the maximum possible segment enumerated in ACPI.
>
> 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. Note also that the VMD segment numbers are
> arbitrarily assigned by the OS, and hence there would need to be some
> negotiation between Xen and the OS to agree on how to enumerate VMD
> segments and devices behind them.
>
> Skip notifying Xen about those devices. Given how VMD bridges can
> multiplex interrupts on behalf of devices behind them there's no need for
> Xen to be aware of such devices for them to be usable by Linux.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> Changes since v1:
> - Adjust commit message width to 75 columns.
> - Expand commit message.
> ---
> drivers/xen/pci.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/drivers/xen/pci.c b/drivers/xen/pci.c
> index 416f231809cb..08e82fd1263e 100644
> --- a/drivers/xen/pci.c
> +++ b/drivers/xen/pci.c
> @@ -43,6 +43,13 @@ static int xen_add_device(struct device *dev)
> pci_mcfg_reserved = true;
> }
> #endif
> +
I think a brief comment here would be helpful so people don't have to
dig out the commit log to understand why this is invalid for Xen.
> + if (pci_domain_nr(pci_dev->bus) >> 16) {
> + dev_info(dev,
> + "not registering with Xen: invalid PCI segment\n");
> + return 0;
> + }
> +
> if (pci_seg_supported) {
> DEFINE_RAW_FLEX(struct physdev_pci_device_add, add, optarr, 1);
>
> @@ -149,6 +156,12 @@ static int xen_remove_device(struct device *dev)
> int r;
> struct pci_dev *pci_dev = to_pci_dev(dev);
>
> + if (pci_domain_nr(pci_dev->bus) >> 16) {
> + dev_info(dev,
> + "not unregistering with Xen: invalid PCI segment\n");
> + return 0;
> + }
> +
> if (pci_seg_supported) {
> struct physdev_pci_device device = {
> .seg = pci_domain_nr(pci_dev->bus),
> @@ -182,6 +195,12 @@ int xen_reset_device(const struct pci_dev *dev)
> .flags = PCI_DEVICE_RESET_FLR,
> };
>
> + if (pci_domain_nr(dev->bus) >> 16) {
> + dev_info(&dev->dev,
> + "unable to notify Xen of device reset: invalid PCI segment\n");
> + return 0;
> + }
> +
> return HYPERVISOR_physdev_op(PHYSDEVOP_pci_device_reset, &device);
> }
> EXPORT_SYMBOL_GPL(xen_reset_device);
> --
> 2.46.0
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/3] vmd: disable MSI remapping bypass under Xen
2025-01-14 10:33 ` [PATCH v2 2/3] vmd: disable MSI remapping bypass under Xen Roger Pau Monne
@ 2025-02-14 17:23 ` Bjorn Helgaas
0 siblings, 0 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2025-02-14 17:23 UTC (permalink / raw)
To: Roger Pau Monne
Cc: linux-kernel, xen-devel, linux-pci, Nirmal Patel,
Jonathan Derrick, Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas
The subject line convention for this file is:
PCI: vmd: Disable MSI remapping ...
On Tue, Jan 14, 2025 at 11:33:12AM +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.
>
> The MSI remapping bypass is an optional feature of VMD bridges, and hence
> when running under Xen it will be masked and devices will be forced to
> redirect its interrupts from the VMD bridge. That mode of operation must
> always be supported by VMD bridges and works when Xen is not aware of
> devices behind the VMD bridge.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> Changes since v1:
> - Add xen header.
> - Expand comment.
> ---
> drivers/pci/controller/vmd.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
> index 264a180403a0..33c9514bd926 100644
> --- a/drivers/pci/controller/vmd.c
> +++ b/drivers/pci/controller/vmd.c
> @@ -17,6 +17,8 @@
> #include <linux/rculist.h>
> #include <linux/rcupdate.h>
>
> +#include <xen/xen.h>
> +
> #include <asm/irqdomain.h>
>
> #define VMD_CFGBAR 0
> @@ -965,6 +967,23 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)
> struct vmd_dev *vmd;
> int err;
>
> + if (xen_domain())
> + /*
> + * Xen doesn't have knowledge about devices in the VMD bus
> + * because the config space of devices behind the VMD bridge is
> + * not known to Xen, and hence Xen cannot discover or configure
> + * them in any way.
> + *
> + * Bypass of MSI remapping won't work in that case as direct
> + * write by Linux to the MSI entries won't result in functional
> + * interrupts, as it's Xen the entity that manages the host
"... as Xen is the entity that ..." ?
> + * interrupt controller and must configure interrupts.
> + * However multiplexing of interrupts by the VMD bridge will
> + * work under Xen, so force the usage of that mode which must
> + * always be supported by VMD bridges.
> + */
> + features &= ~VMD_FEAT_CAN_BYPASS_MSI_REMAP;
Since the comment is so long, I would add braces even though it's only
a single statement. Or maybe moving the comment above the "if" would
make more sense.
> if (resource_size(&dev->resource[VMD_CFGBAR]) < (1 << 20))
> return -ENOMEM;
>
> --
> 2.46.0
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 0/3] xen: fix usage of devices behind a VMD bridge
2025-02-14 17:17 ` Bjorn Helgaas
@ 2025-02-14 18:46 ` Jürgen Groß
0 siblings, 0 replies; 13+ messages in thread
From: Jürgen Groß @ 2025-02-14 18:46 UTC (permalink / raw)
To: Bjorn Helgaas, Roger Pau Monne, Nirmal Patel
Cc: linux-kernel, xen-devel, Jonathan Derrick
[-- Attachment #1.1.1: Type: text/plain, Size: 1653 bytes --]
On 14.02.25 18:17, Bjorn Helgaas wrote:
> [+to Juergen, Nirmal, +cc Jonathan]
>
> On Tue, Jan 14, 2025 at 11:33:10AM +0100, Roger Pau Monne wrote:
>> Hello,
>>
>> The following series should fix the usage of devices behind a VMD bridge
>> when running Linux as a Xen PV hardware domain (dom0). I've only been
>> able to test PV. I think PVH should also work but I don't have hardware
>> capable of testing it right now.
>>
>> I don't expect the first two patches to be problematic, the last patch
>> is likely to be more controversial. I've tested it internally and
>> didn't see any issues, but my testing of PV mode is mostly limited to
>> dom0.
>>
>> Thanks, Roger.
>>
>> Roger Pau Monne (3):
>> xen/pci: do not register devices with segments >= 0x10000
>> vmd: disable MSI remapping bypass under Xen
>> pci/msi: remove pci_msi_ignore_mask
>>
>> arch/x86/pci/xen.c | 8 ++------
>> drivers/pci/controller/vmd.c | 19 ++++++++++++++++++
>> drivers/pci/msi/msi.c | 37 ++++++++++++++++++++----------------
>> drivers/xen/pci.c | 19 ++++++++++++++++++
>> include/linux/msi.h | 3 ++-
>> kernel/irq/msi.c | 2 +-
>> 6 files changed, 64 insertions(+), 24 deletions(-)
>
> We got an ack from Thomas, so I'm fine with this from a PCI
> perspective. How should it be merged? Via Xen or PCI? I'm happy to
> merge via PCI, but would also want acks from Juergen for the Xen
> piece and Nirmal for the VMD piece.
I'm fine with this to go in via the PCI tree.
For the Xen related parts:
Acked-by: Juergen Gross <jgross@suse.com>
Juergen
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2025-02-14 18:46 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-14 10:33 [PATCH v2 0/3] xen: fix usage of devices behind a VMD bridge Roger Pau Monne
2025-01-14 10:33 ` [PATCH v2 1/3] xen/pci: do not register devices with segments >= 0x10000 Roger Pau Monne
2025-02-14 17:20 ` Bjorn Helgaas
2025-01-14 10:33 ` [PATCH v2 2/3] vmd: disable MSI remapping bypass under Xen Roger Pau Monne
2025-02-14 17:23 ` Bjorn Helgaas
2025-01-14 10:33 ` [PATCH v2 3/3] pci/msi: remove pci_msi_ignore_mask Roger Pau Monne
2025-02-05 15:17 ` Bjorn Helgaas
2025-02-06 8:33 ` Roger Pau Monné
2025-02-06 16:02 ` Bjorn Helgaas
2025-02-14 11:53 ` Thomas Gleixner
2025-02-05 14:37 ` [PATCH v2 0/3] xen: fix usage of devices behind a VMD bridge Roger Pau Monné
2025-02-14 17:17 ` Bjorn Helgaas
2025-02-14 18:46 ` Jürgen Groß
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox