mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zenghui Yu <yuzenghui@huawei.com>
To: Marc Zyngier <maz@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <tglx@linutronix.de>,
	<jason@lakedaemon.net>, <wanghaibin.wang@huawei.com>,
	Nianyao Tang <tangnianyao@huawei.com>
Subject: Re: [PATCH] irqchip/gic-v4.1: Disallow setting affinity for virtual SGIs
Date: Tue, 14 Apr 2020 16:09:35 +0800	[thread overview]
Message-ID: <e0c86d66-e8d4-99ba-917f-c6ba75181e03@huawei.com> (raw)
In-Reply-To: <86pnces6kn.wl-maz@kernel.org>

Hi Marc,

On 2020/4/11 17:41, Marc Zyngier wrote:
> Hi Zenghui,
> 
> On Sat, 11 Apr 2020 10:10:32 +0100,
> Zenghui Yu <yuzenghui@huawei.com> wrote:
>>
>> Running a guest on the GICv4.1-implemented board, we will get the
>> following warning:
>>
>> [   59.062120] genirq: irq_chip GICv4.1-sgi did not update eff. affinity mask of irq 46
>>
>> It may be caused by irqbalance (or other userspace tools) which tries to
>> change the affinity of virtual SGIs on the host. One way to "fix" it is
>> to update the effective_affinity value in irq_set_affinity callback. But
>> as the comment above says, "There is no notion of affinity for virtual
>> SGIs, at least not on the host", doing so only makes things confusing.
>>
>> Given the vSGIs are private to the specified vPE, changing the affinity
>> on host is actually meaningless and achieves nothing. Let's just forbid
>> it.
>>
>> Reported-by: Nianyao Tang <tangnianyao@huawei.com>
>> Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
>> ---
>>
>> Hi Marc,
>>
>> This just restores the behavior of your v5 [*]. I wonder that what's the
>> reason to change it to 'return IRQ_SET_MASK_OK' in v6? What I've missed
>> here?
>>
>> [*] https://lore.kernel.org/kvm/20200304203330.4967-9-maz@kernel.org/
> 
> Not allowing the affinity move results in the kernel screaming when
> playing with CPU hotplug (it really wants to move the interrupt
> around). Which is why I dropped the -EINVAL, therefore introducing
> another bug. I fixed it with this patch[1], which I was planning to
> post after -rc1.

I didn't realize the CPU hotplug case. Please take your approach to
fix it. (As mentioned, this was also one way I planned to fix it.)

> 
> Let me know what you think

TBH, I'm not very familiar with the IRQ core behavior on CPU hotplug.
I will read further and comment on your formal patch (please cc me),
but now spinning on some other things...


Thanks,
Zenghui


      reply	other threads:[~2020-04-14  8:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-11  9:10 Zenghui Yu
2020-04-11  9:41 ` Marc Zyngier
2020-04-14  8:09   ` Zenghui Yu [this message]

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=e0c86d66-e8d4-99ba-917f-c6ba75181e03@huawei.com \
    --to=yuzenghui@huawei.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=tangnianyao@huawei.com \
    --cc=tglx@linutronix.de \
    --cc=wanghaibin.wang@huawei.com \
    /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

all inboxes | Powered by JetHome®