Message ID | 20240216202527.2493264-1-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-69293-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp767828dyb; Fri, 16 Feb 2024 12:25:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVB0pEX37lNr+xkioi0J8GDvP/31eLKnJ6U+V8D4Z4Gl7qIviqWLjgmo5XvXIHJ87ve6iiz8DfWxzyix42LOI/oV6TscQ== X-Google-Smtp-Source: AGHT+IG13XFWBmVcrK/MDn3aU6ZCiySeNpG7d0q5aeL0IhVAm9FIMeY0ZhzK0RUhQ/RvyXpu7tgk X-Received: by 2002:a0d:dd94:0:b0:607:a0cf:d9ff with SMTP id g142-20020a0ddd94000000b00607a0cfd9ffmr6239734ywe.31.1708115148568; Fri, 16 Feb 2024 12:25:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708115148; cv=pass; d=google.com; s=arc-20160816; b=mcg7G2TZ8ZB6T3RTuRp6idjlu8nk+hHpd1OHwHxXQYxtiAORMUx9q+pLXsbdHViUST n9uMPHOVzW+ix3DgwDqfRgWbFpGPf3uR1wGQDtMevjDA5y9UBHCAL4p3YYD2PcM9pqnl i55EdLkC/iDjSUKwWndjzYXwlSs7BA1y/WBtAigE1gS0Qdw3xsH4+8g5QwN7w6qtvthf SCeFXqYPkatS242WXaMgD1zIs0B5ajFg1deBAkPk3pTLhwACDJModtLuN+XIXgRbnEJ8 F8q7piAFkGa8of0gIk9HCqUw2vM/5ilVo5iJq5ZH/HkogYC7mHplCV0TPS72gbCZ7z9B SWEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Es1Zfpnot7t8dYpKyO5gVL1oLAd05L/DxJA2k+A5vT4=; fh=D+pJfjAH0KjH3m2NOUjICL42eShPqIOrEBw/UMHDQJE=; b=DL1Nfc6fChy1pdAwArOi+HGrP1YuwNP/DrlYKnWyJ/T8akG1aPmkSiB0Olh9xL2niP JW5utWdDHdiiPs8kOsdP5S4B57qLdi2kFNYC8JuhzFci1HWfCXGyFRbti0HBtcMuocM5 cASHzfgeTGos3y6DfpDlk9ydBiCSRUK3GDIQZYAo04VLeUiglSDzFtf/yvY8jCYRxATh FLH6M3T1gZsDvXghhM/0noNY5Hx33Kpl5pM6HiyH7QOJeHalEPxLrZje3v2aJ9sKiuT5 KyZPmaVOitbuqeOn8+x8zuD/lNHqgdmtShha4r/cu/IW/urPGqXFhOmwFvFa132bBXye Jkug==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="MnNmhh1/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69293-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69293-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c21-20020a37e115000000b007873518dda4si675135qkm.105.2024.02.16.12.25.48 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 12:25:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69293-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="MnNmhh1/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69293-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69293-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D549A1C21493 for <ouuuleilei@gmail.com>; Fri, 16 Feb 2024 20:25:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2343C13AA46; Fri, 16 Feb 2024 20:25:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MnNmhh1/" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97E4444369 for <linux-kernel@vger.kernel.org>; Fri, 16 Feb 2024 20:25:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708115132; cv=none; b=rkTRFNBVvYdnUUC9jpFg40wUBsQ3H0mWntr79CW51FTI0yMuqKp7QHjsESDDoSdjVLbDMLHNiAv50oY+NlZNTEFLB665MlQLLt8k6C0n4NGQ8m+tQnTeNzddtmyKmFI7IVJlnp4AMZoTsclkQOPHLflAQwLTDPGFuEVs8j/Scvk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708115132; c=relaxed/simple; bh=5m10hyFOE1LGB3w8Av1dfB/+tfaDWVKf5u7u9AlK1ok=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ufktK4UQ4RGbVzd0rjIp2II5K1C8DPNuh4kikOXdCeQI610bqOmmwsmyAitAqUQlrgy8FEtk8fmy20sWeuZOHhXOxyZbsmMvcJDkkFcT/7kq8Bb3VJrnGld2v2PDYF/yw+UX5cuN0n3HK8iDYGbfu9MsaoPz6lGmBqw1ACvpTsI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MnNmhh1/; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CED9FC433C7; Fri, 16 Feb 2024 20:25:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708115132; bh=5m10hyFOE1LGB3w8Av1dfB/+tfaDWVKf5u7u9AlK1ok=; h=From:To:Cc:Subject:Date:From; b=MnNmhh1//5twLjJEkyCnIDz9Um/b2GOKFtnqMuxk9ERPUcI+pUQonhRu/Sh64ion7 sHPrqpdy0NNwF/cXo0KoOA/F23NVdadthL6IggofQ7flgncidAB2XgP4ZXxYqcMepR yhN5JTA1vHapW/9vg3GvLxM+oN3klxnxBUqO73GNWtv3AaKMxAE4baeP/3IzHMtPXy IP+23WhEuOoK2Xa/o6Ey3/YuaqhSDJ33oCafVJ+FBd7S0dZLN89EAUro38Qq3rBKlJ eVmpRP7nGNwuXiGyQq99Ll5PyVHO0j13tNsO00DsO08z/gAJ+uD5FoTf3kU2DecEol cwqBHuKGaPq+w== From: Arnd Bergmann <arnd@kernel.org> To: Xin Li <xin@zytor.com>, "H. Peter Anvin" <hpa@zytor.com> Cc: Arnd Bergmann <arnd@arndb.de>, Andy Lutomirski <luto@kernel.org>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com>, x86@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] x86/fred: fix building without CONFIG_KVM Date: Fri, 16 Feb 2024 21:25:14 +0100 Message-Id: <20240216202527.2493264-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791088549896106976 X-GMAIL-MSGID: 1791088549896106976 |
Series |
x86/fred: fix building without CONFIG_KVM
|
|
Commit Message
Arnd Bergmann
Feb. 16, 2024, 8:25 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de> Some constants are only defined if KVM is enabled: arch/x86/entry/entry_fred.c:117:9: error: use of undeclared identifier 'POSTED_INTR_VECTOR' 117 | SYSVEC(POSTED_INTR_VECTOR, kvm_posted_intr_ipi), | ^ arch/x86/entry/entry_fred.c:118:9: error: use of undeclared identifier 'POSTED_INTR_WAKEUP_VECTOR' 118 | SYSVEC(POSTED_INTR_WAKEUP_VECTOR, kvm_posted_intr_wakeup_ipi), | ^ arch/x86/entry/entry_fred.c:119:9: error: use of undeclared identifier 'POSTED_INTR_NESTED_VECTOR' 119 | SYSVEC(POSTED_INTR_NESTED_VECTOR, kvm_posted_intr_nested_ipi), | ^ Hiding the references behind the same preprocessor conditional is probably the best fix here. Fixes: 14619d912b65 ("x86/fred: FRED entry/exit and dispatch code") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- arch/x86/entry/entry_fred.c | 2 ++ 1 file changed, 2 insertions(+)
Comments
On 2/16/24 12:25, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > Some constants are only defined if KVM is enabled: > > arch/x86/entry/entry_fred.c:117:9: error: use of undeclared identifier 'POSTED_INTR_VECTOR' > 117 | SYSVEC(POSTED_INTR_VECTOR, kvm_posted_intr_ipi), > | ^ > arch/x86/entry/entry_fred.c:118:9: error: use of undeclared identifier 'POSTED_INTR_WAKEUP_VECTOR' > 118 | SYSVEC(POSTED_INTR_WAKEUP_VECTOR, kvm_posted_intr_wakeup_ipi), > | ^ > arch/x86/entry/entry_fred.c:119:9: error: use of undeclared identifier 'POSTED_INTR_NESTED_VECTOR' > 119 | SYSVEC(POSTED_INTR_NESTED_VECTOR, kvm_posted_intr_nested_ipi), > | ^ > > Hiding the references behind the same preprocessor conditional is > probably the best fix here. > > Fixes: 14619d912b65 ("x86/fred: FRED entry/exit and dispatch code") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Thanks. > --- > arch/x86/entry/entry_fred.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/x86/entry/entry_fred.c b/arch/x86/entry/entry_fred.c > index ac120cbdaaf2..660b7f7f9a79 100644 > --- a/arch/x86/entry/entry_fred.c > +++ b/arch/x86/entry/entry_fred.c > @@ -114,9 +114,11 @@ static idtentry_t sysvec_table[NR_SYSTEM_VECTORS] __ro_after_init = { > > SYSVEC(IRQ_WORK_VECTOR, irq_work), > > +#if IS_ENABLED(CONFIG_KVM) > SYSVEC(POSTED_INTR_VECTOR, kvm_posted_intr_ipi), > SYSVEC(POSTED_INTR_WAKEUP_VECTOR, kvm_posted_intr_wakeup_ipi), > SYSVEC(POSTED_INTR_NESTED_VECTOR, kvm_posted_intr_nested_ipi), > +#endif > }; > > static bool fred_setup_done __initdata;
On Fri, Feb 16, 2024, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > Some constants are only defined if KVM is enabled: > > arch/x86/entry/entry_fred.c:117:9: error: use of undeclared identifier 'POSTED_INTR_VECTOR' > 117 | SYSVEC(POSTED_INTR_VECTOR, kvm_posted_intr_ipi), > | ^ > arch/x86/entry/entry_fred.c:118:9: error: use of undeclared identifier 'POSTED_INTR_WAKEUP_VECTOR' > 118 | SYSVEC(POSTED_INTR_WAKEUP_VECTOR, kvm_posted_intr_wakeup_ipi), > | ^ > arch/x86/entry/entry_fred.c:119:9: error: use of undeclared identifier 'POSTED_INTR_NESTED_VECTOR' > 119 | SYSVEC(POSTED_INTR_NESTED_VECTOR, kvm_posted_intr_nested_ipi), > | ^ > > Hiding the references behind the same preprocessor conditional is > probably the best fix here. > > Fixes: 14619d912b65 ("x86/fred: FRED entry/exit and dispatch code") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- Late to the party :-) https://lore.kernel.org/all/20240215133631.136538-1-max.kellermann@ionos.com
diff --git a/arch/x86/entry/entry_fred.c b/arch/x86/entry/entry_fred.c index ac120cbdaaf2..660b7f7f9a79 100644 --- a/arch/x86/entry/entry_fred.c +++ b/arch/x86/entry/entry_fred.c @@ -114,9 +114,11 @@ static idtentry_t sysvec_table[NR_SYSTEM_VECTORS] __ro_after_init = { SYSVEC(IRQ_WORK_VECTOR, irq_work), +#if IS_ENABLED(CONFIG_KVM) SYSVEC(POSTED_INTR_VECTOR, kvm_posted_intr_ipi), SYSVEC(POSTED_INTR_WAKEUP_VECTOR, kvm_posted_intr_wakeup_ipi), SYSVEC(POSTED_INTR_NESTED_VECTOR, kvm_posted_intr_nested_ipi), +#endif }; static bool fred_setup_done __initdata;