lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 07 Mar 2022 14:01:02 +0000
From:   Marc Zyngier <maz@...nel.org>
To:     John Garry <john.garry@...wei.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        chenxiang <chenxiang66@...ilicon.com>,
        Shameer Kolothum <shameerali.kolothum.thodi@...wei.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "liuqi (BA)" <liuqi115@...wei.com>, <wangxiongfeng2@...wei.com>,
        David Decotigny <decot@...gle.com>
Subject: Re: PCI MSI issue for maxcpus=1

Hi John,

On Mon, 07 Mar 2022 13:48:11 +0000,
John Garry <john.garry@...wei.com> wrote:
> 
> Hi Marc,
> 
> > 
> > diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
> > index 2bdfce5edafd..97e9eb9aecc6 100644
> > --- a/kernel/irq/msi.c
> > +++ b/kernel/irq/msi.c
> > @@ -823,6 +823,19 @@ static int msi_init_virq(struct irq_domain *domain, int virq, unsigned int vflag
> >   	if (!(vflags & VIRQ_ACTIVATE))
> >   		return 0;
> >   +	if (!(vflags & VIRQ_CAN_RESERVE)) {
> > +		/*
> > +		 * If the interrupt is managed but no CPU is available
> > +		 * to service it, shut it down until better times.
> > +		 */
> > +		if (irqd_affinity_is_managed(irqd) &&
> > +		    !cpumask_intersects(irq_data_get_affinity_mask(irqd),
> > +					cpu_online_mask)) {
> > +			irqd_set_managed_shutdown(irqd);
> > +			return 0;
> > +		}
> > +	}
> > +
> >   	ret = irq_domain_activate_irq(irqd, vflags & VIRQ_CAN_RESERVE);
> >   	if (ret)
> >   		return ret;
> > 
> 
> Yeah, that seems to solve the issue. I will test it a bit more.

Thanks. For the record, I have pushed a branch at [1]. The patch is
extremely similar, just moved up a tiny bit to avoid duplicating the
!VIRQ_CAN_RESERVE case.

> We need to check the isolcpus cmdline issue as well - wang xiongfeng,
> please assist here. I assume that this feature just never worked for
> arm64 since it was added.

That one is still on my list. isolcpus certainly has had as little
testing as you can imagine.

> Out of interest, is the virtio managed interrupts support just in
> your sandbox? You did mention earlier in the thread that you were
> considering adding this feature.

As it turns out, QEMU's non-legacy virtio support allows the kernel to
do the right thing (multi-queue support and affinity management).
Using kvmtool, I only get a single interrupt although the device
pretends to support some MQ extension. I haven't dug into it yet.

	M.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ