[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch RFC 19/38] irqdomain/msi: Provide DOMAIN_BUS_VMD_MSI
- To: LKML <linux-kernel@xxxxxxxxxxxxxxx>
- From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
- Date: Fri, 21 Aug 2020 02:24:43 +0200
- Cc: x86@xxxxxxxxxx, Jon Derrick <jonathan.derrick@xxxxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>, iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>, Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>, Wei Liu <wei.liu@xxxxxxxxxx>, "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>, Stephen Hemminger <sthemmin@xxxxxxxxxxxxx>, Steve Wahl <steve.wahl@xxxxxxx>, Dimitri Sivanich <sivanich@xxxxxxx>, Russ Anderson <rja@xxxxxxx>, linux-pci@xxxxxxxxxxxxxxx, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>, Jonathan Derrick <jonathan.derrick@xxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Marc Zyngier <maz@xxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, "Rafael J. Wysocki" <rafael@xxxxxxxxxx>, Megha Dey <megha.dey@xxxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxxxxxx>, Dave Jiang <dave.jiang@xxxxxxxxx>, Alex Williamson <alex.williamson@xxxxxxxxxx>, Jacob Pan <jacob.jun.pan@xxxxxxxxx>, Baolu Lu <baolu.lu@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Dan Williams <dan.j.williams@xxxxxxxxx>
- Delivery-date: Fri, 21 Aug 2020 02:26:39 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
PCI devices behind a VMD bus are not subject to interrupt remapping, but
the irq domain for VMD MSI cannot be distinguished from a regular PCI/MSI
irq domain.
Add a new domain bus token and allow it in the bus token check in
msi_check_reservation_mode() to keep the functionality the same once VMD
uses this token.
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Jon Derrick <jonathan.derrick@xxxxxxxxx>
---
include/linux/irqdomain.h | 1 +
kernel/irq/msi.c | 7 ++++++-
2 files changed, 7 insertions(+), 1 deletion(-)
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -84,6 +84,7 @@ enum irq_domain_bus_token {
DOMAIN_BUS_FSL_MC_MSI,
DOMAIN_BUS_TI_SCI_INTA_MSI,
DOMAIN_BUS_WAKEUP,
+ DOMAIN_BUS_VMD_MSI,
};
/**
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -370,8 +370,13 @@ static bool msi_check_reservation_mode(s
{
struct msi_desc *desc;
- if (domain->bus_token != DOMAIN_BUS_PCI_MSI)
+ switch(domain->bus_token) {
+ case DOMAIN_BUS_PCI_MSI:
+ case DOMAIN_BUS_VMD_MSI:
+ break;
+ default:
return false;
+ }
if (!(info->flags & MSI_FLAG_MUST_REACTIVATE))
return false;
|