2020-08-26 14:31:25

by Thomas Gleixner

[permalink] [raw]
Subject: [patch V2 23/46] irqdomain/msi: Provide DOMAIN_BUS_VMD_MSI

From: Thomas Gleixner <[email protected]>

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 <[email protected]>

---
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;



2020-08-26 20:44:24

by Marc Zyngier

[permalink] [raw]
Subject: Re: [patch V2 23/46] irqdomain/msi: Provide DOMAIN_BUS_VMD_MSI

On Wed, 26 Aug 2020 12:16:51 +0100,
Thomas Gleixner <[email protected]> wrote:
>
> From: Thomas Gleixner <[email protected]>
>
> 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 <[email protected]>
>
> ---
> 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;

Acked-by: Marc Zyngier <[email protected]>

M.

--
Without deviation from the norm, progress is not possible.

2020-08-26 20:58:45

by Jon Derrick

[permalink] [raw]
Subject: Re: [patch V2 23/46] irqdomain/msi: Provide DOMAIN_BUS_VMD_MSI

On Wed, 2020-08-26 at 21:42 +0100, Marc Zyngier wrote:
> On Wed, 26 Aug 2020 12:16:51 +0100,
> Thomas Gleixner <[email protected]> wrote:
> > From: Thomas Gleixner <[email protected]>
> >
> > 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 <[email protected]>
> >
> > ---
> > 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;
>
> Acked-by: Marc Zyngier <[email protected]>
>
> M.
>

Acked-by: Jon Derrick <[email protected]>

2020-09-16 18:47:00

by tip-bot2 for Jacob Pan

[permalink] [raw]
Subject: [tip: x86/irq] irqdomain/msi: Provide DOMAIN_BUS_VMD_MSI

The following commit has been merged into the x86/irq branch of tip:

Commit-ID: c6c9e2838c5f0b94773511586123bcb125757f2a
Gitweb: https://git.kernel.org/tip/c6c9e2838c5f0b94773511586123bcb125757f2a
Author: Thomas Gleixner <[email protected]>
AuthorDate: Wed, 26 Aug 2020 13:16:51 +02:00
Committer: Thomas Gleixner <[email protected]>
CommitterDate: Wed, 16 Sep 2020 16:52:36 +02:00

irqdomain/msi: Provide DOMAIN_BUS_VMD_MSI

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 <[email protected]>
Acked-by: Marc Zyngier <[email protected]>
Acked-by: Jon Derrick <[email protected]>
Link: https://lore.kernel.org/r/[email protected]

---
include/linux/irqdomain.h | 1 +
kernel/irq/msi.c | 7 ++++++-
2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index b37350c..44445d9 100644
--- 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,
};

/**
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index 640668e..616b958 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -364,8 +364,13 @@ static bool msi_check_reservation_mode(struct irq_domain *domain,
{
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;