From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C376C2BA2B for ; Sat, 11 Apr 2020 09:41:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0F21E2084D for ; Sat, 11 Apr 2020 09:41:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586598079; bh=UNW5qpnPpE/saHzBUeQgVcfI8TnVnldaRBVw6iGXcPo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=fSS58oRpu0uEym4KzL6syeTYc3Yub9MdLMZ5eyj9ojNz5JfCRyX7qnQEEBg1pFjkM pmBIwE089y/y3++aHGyFkNyrCemEuZ6FQI/Y18SeVcCSss2qCR4LbJMFN+CM/9c+jR wKvOjQuyTklU3qEVmJMK3lq+tohGDyNl9pSZX9Cs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726026AbgDKJlQ (ORCPT ); Sat, 11 Apr 2020 05:41:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:57794 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725927AbgDKJlQ (ORCPT ); Sat, 11 Apr 2020 05:41:16 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 36B3D20787; Sat, 11 Apr 2020 09:41:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586598076; bh=UNW5qpnPpE/saHzBUeQgVcfI8TnVnldaRBVw6iGXcPo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Bx+3E0TWGy7jQBXwnxuJjlebU78+Vs90ehN2iAKyrzVPLVCWHGC5xTSYx3i34oUxs f/x3gFovALHQDkybLNKhGibsaKCyLdiAjTL6U53pluwLUiBDDRWwKgAL//bKpFJnJy DEh3D5Tmuo0L811nb9f1dBtyz3LYydRBaM00XPY0= Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=big-swifty.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jNCdW-002LsR-Fh; Sat, 11 Apr 2020 10:41:14 +0100 Date: Sat, 11 Apr 2020 10:41:12 +0100 Message-ID: <86pnces6kn.wl-maz@kernel.org> From: Marc Zyngier To: Zenghui Yu Cc: , , , , Nianyao Tang Subject: Re: [PATCH] irqchip/gic-v4.1: Disallow setting affinity for virtual SGIs In-Reply-To: <20200411091032.661-1-yuzenghui@huawei.com> References: <20200411091032.661-1-yuzenghui@huawei.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: yuzenghui@huawei.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, jason@lakedaemon.net, wanghaibin.wang@huawei.com, tangnianyao@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Zenghui, On Sat, 11 Apr 2020 10:10:32 +0100, Zenghui Yu 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 > Signed-off-by: Zenghui Yu > --- > > 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. Let me know what you think Thanks, M. [1] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?h=irq/gic-v4.1-fixes-5.7&id=26bf9895ebe8dbe4ff509aebc71b5990919a740d -- Jazz is not dead, it just smells funny.