Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp205909imn; Thu, 4 Aug 2022 02:42:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR4MrKYWE3rH0PMojjsFLWO6seWc5ZnEime21fxK4RCk9VipHjhDjmV1IIJTFnjX4qzzcD6P X-Received: by 2002:a05:6402:1d4c:b0:43d:debb:5667 with SMTP id dz12-20020a0564021d4c00b0043ddebb5667mr1151649edb.140.1659606143795; Thu, 04 Aug 2022 02:42:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659606143; cv=none; d=google.com; s=arc-20160816; b=LZPyQqs/pzccMaPtEfw8r/PXDhSHurHhUelGbVUDX6c6zcgUJ1IghcjWWFp01kMA9J hLURy+VmYM3s9U6e7g6K6LaEt5XVzKD8S9wDkdM4+yWcrM5C2zi2O4rFtrMq+iWEzl6u +ayQ16oqHaj5Dp62EBYDBs/elpoY1/JEx6a/mbqTM/YcHv19qYQrnR+JfFW3RmALHtQe u46Sb5hC6wJhJfv5G5bx9EzI3zXhKHzchQfC8Nyuv3T3moXXQ7CvcMxR+tMk+cvFNlRZ Oh0i5gRhRdqrqAUSLYleT7bg8K4I3OW2dvyhqTpng5VhcvYo0PpI7VqhEPTLKRueVZ9F /FgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=U18pVqbgb40f2ltnOaA10a6DWJQvO9p0SPWzD50fuk0=; b=O6nGZnK5981uMLkrwmeNf4E03Wk0dFYmAhK2udcUD6mzTFABoiCz8sPV5f9khBR/QM W26ndds/pIffWc6UmNasYNBiPau6mVTRpVKv1wmpToJMeg0pSRd1rs/qGIhLk4PDqZjg SLyRM/SWacVCdBsuSUgtfpbTONmEEktGJCgPwI0w94fdIQxpMwuaAnRSkarGuKhbRlnr fxZH4hLagxsWiR6IXPIprw9fU7gUC1/MqJPEHtgCZ6Hah4EIItgOTT2D3Cl2c7LzlRo6 8Q7ziiCojOHMErRxIFqDEMV4DjouM7jtAneWVB990bluvKImaG740n+cU8VG+kZI1/Ba 1EOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VKKKZClc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g11-20020a056402090b00b0043d552deb37si941542edz.14.2022.08.04.02.41.58; Thu, 04 Aug 2022 02:42:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VKKKZClc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238194AbiHDJDR (ORCPT + 99 others); Thu, 4 Aug 2022 05:03:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237429AbiHDJDP (ORCPT ); Thu, 4 Aug 2022 05:03:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 416184D4C9; Thu, 4 Aug 2022 02:03:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C706F6155B; Thu, 4 Aug 2022 09:03:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29064C433D6; Thu, 4 Aug 2022 09:03:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659603793; bh=SivxL3skWvzw9jhqnKcu/8CxHVkrZngsEGy7QHmjwIE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VKKKZClcZEJ9Q3mSncYVDlpJDWwX5lRtpWJVA7hyjLfbZ+6VuQD0FBo6dTCyVfVwm 3Z+OPcs+kQzFAMkdB34czVDofL9lxQ3iayIdjT2p06IJtaGmFBLk82Vn7WH3HEKdI7 DNEedPtHJhb3zvI3W7kaN/jmnz9i+WlEeLTlGRAOfRZ/P/FhbyaTQ6wWNnKv8QIDDU un2vaEgq4hQ5P4lnAss5fn9MSlZ+jVo1OcYVGIhmnqmdtOZDflHdrbXY0TrmZS4/F5 kUejs6MYQKkSPwdEf5pRSqy0/QQXSonr6A7nmYvr9+iznlHJkvU7JqrLRpmP8MOhMn YiT3WcV4dxkNg== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oJWl4-000us9-Li; Thu, 04 Aug 2022 10:03:10 +0100 Date: Thu, 04 Aug 2022 10:03:10 +0100 Message-ID: <87o7x0wfch.wl-maz@kernel.org> From: Marc Zyngier To: "Michael Kelley (LINUX)" Cc: Randy Dunlap , Stephen Hemminger , KY Srinivasan , Haiyang Zhang , "wei.liu@kernel.org" , Dexuan Cui , "joro@8bytes.org" , "will@kernel.org" , "robin.murphy@arm.com" , "samuel@sholland.org" , "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "iommu@lists.linux.dev" Subject: Re: [PATCH 1/1] iommu/hyper-v: Use helper instead of directly accessing affinity In-Reply-To: References: <1658796820-2261-1-git-send-email-mikelley@microsoft.com> <5ea65d3d-745e-0a16-c885-a224a20ee7ce@infradead.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-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: 185.219.108.64 X-SA-Exim-Rcpt-To: mikelley@microsoft.com, rdunlap@infradead.org, sthemmin@microsoft.com, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, joro@8bytes.org, will@kernel.org, robin.murphy@arm.com, samuel@sholland.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, iommu@lists.linux.dev X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 03 Aug 2022 17:26:10 +0100, "Michael Kelley (LINUX)" wrote: > > From: Randy Dunlap Sent: Monday, July 25, 2022 7:39 PM > > > > On 7/25/22 17:53, Michael Kelley wrote: > > > Recent changes to solve inconsistencies in handling IRQ masks #ifdef > > > out the affinity field in irq_common_data for non-SMP configurations. > > > The current code in hyperv_irq_remapping_alloc() gets a compiler error > > > in that case. > > > > > > Fix this by using the new irq_data_update_affinity() helper, which > > > handles the non-SMP case correctly. > > > > > > > Reported-by: Randy Dunlap > > > Signed-off-by: Michael Kelley > > Tested-by: Randy Dunlap > > Acked-by: Randy Dunlap > > > > Thanks. > > > > > --- > > > drivers/iommu/hyperv-iommu.c | 4 +--- > > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > > > diff --git a/drivers/iommu/hyperv-iommu.c b/drivers/iommu/hyperv-iommu.c > > > index 51bd66a..e190bb8 100644 > > > --- a/drivers/iommu/hyperv-iommu.c > > > +++ b/drivers/iommu/hyperv-iommu.c > > > @@ -68,7 +68,6 @@ static int hyperv_irq_remapping_alloc(struct irq_domain > > *domain, > > > { > > > struct irq_alloc_info *info = arg; > > > struct irq_data *irq_data; > > > - struct irq_desc *desc; > > > int ret = 0; > > > > > > if (!info || info->type != X86_IRQ_ALLOC_TYPE_IOAPIC || nr_irqs > 1) > > > @@ -90,8 +89,7 @@ static int hyperv_irq_remapping_alloc(struct irq_domain *domain, > > > * Hypver-V IO APIC irq affinity should be in the scope of > > > * ioapic_max_cpumask because no irq remapping support. > > > */ > > > - desc = irq_data_to_desc(irq_data); > > > - cpumask_copy(desc->irq_common_data.affinity, &ioapic_max_cpumask); > > > + irq_data_update_affinity(irq_data, &ioapic_max_cpumask); > > > > > > return 0; > > > } > > > > -- > > Marc -- > > Could you pick up this patch for the 6.0 merge window? It's a fix to a > side effect of Samuel Holland's series to unify SMP and UP handling of > affinity masks that went through your irq/irqchip-next tree. Applied with a: Fixes: aa0813581b8d ("genirq: Provide an IRQ affinity mask in non-SMP configs") Thanks, M. -- Without deviation from the norm, progress is not possible.