From mboxrd@z Thu Jan 1 00:00:00 1970 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 589F81A38E4 for ; Wed, 20 Nov 2024 10:59:43 +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=1732100383; cv=none; b=BeuTy+1e8A6+NUjuoW06bu/mEjq/+P79r/BpSMcKpOq0gHIFPjuW5Y0CzecVcKRIWyABlnCRZvoiZI5vPtmAOkn0fZ5QmFHh0DefYvNOUeaCFp+mRIY7wyfGDNq0ixPErgY9yWB7fV6Rkbon4DcwxttvXA0BQnrTUfSDhPnap28= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732100383; c=relaxed/simple; bh=I5znxuBsPqe4clFsOOiDKc6ZTeeOBV30wCBrrc1wJp0=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=GFPDhtzO4OOJaWgSIffVgiSQVuYD4v3IWGnXW6CusYO88GDWjSAnywMla7HmCzYRXppcMvd5jWKa1vbEgjsKhnW+Sm/LVmWnrGRTZ3r5Url7JyI6ZmhTNZC4Etn4NSrpXjRJiyMA4LHLu3jcg7qRRWlTbjqGXfSMyTDK06G3Xwo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iXPmV2FI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iXPmV2FI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4FC2C4CED6; Wed, 20 Nov 2024 10:59:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1732100382; bh=I5znxuBsPqe4clFsOOiDKc6ZTeeOBV30wCBrrc1wJp0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iXPmV2FIr+VYbtUfG83JF8Iz6bkSRCe478tdxnlxMnlBQkok/tXZ/7OaQRuzf1k2y PtOCibjHY2UCNB7Yb6ICwPeviqO17YSmSb/+i287KYE5428cQ3zcMXDZuh3x8Y+zkN q4t8xRGLH+0auKRr7UCE04WUeqfVO1KrjxfuFmLeJ6pOofk4id9prbUGxDZjI2OnA9 xuo3yBjdPlNY4iZ2F7ATsS6HslrU7o/Ao56bE/BvRh/NJXyFqunt2EnEL1wCZ5V7iA p9gafuR4cFP5mXW+tyURXiSEIamIK5MZ1Y/ictDlgZs7IEOSYPsIkicn6NaMyQi+2H 6oJhdRpqSXtMA== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.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 1tDiQu-00ERgy-I6; Wed, 20 Nov 2024 10:59:40 +0000 Date: Wed, 20 Nov 2024 10:59:39 +0000 Message-ID: <86r076uq5g.wl-maz@kernel.org> From: Marc Zyngier To: kernel test robot Cc: oe-kbuild-all@lists.linux.dev, Oliver Upton , Joey Gouly Subject: Re: [linux-next:master 7083/12380] include/linux/compiler_types.h:517:45: error: call to '__compiletime_assert_845' declared with attribute error: BUILD_BUG_ON failed: !__builtin_constant_p(sr) In-Reply-To: <202411201857.ZNudtGJl-lkp@intel.com> References: <202411201857.ZNudtGJl-lkp@intel.com> 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/29.4 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: oe-kbuild-all@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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: lkp@intel.com, oe-kbuild-all@lists.linux.dev, oliver.upton@linux.dev, joey.gouly@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Wed, 20 Nov 2024 10:09:36 +0000, kernel test robot wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > head: ac24e26aa08fe026804f678599f805eb13374a5d > commit: a0162020095e2a34a59fc64c07183cc039e759f6 [7083/12380] KVM: arm64: Extend masking facility to arbitrary registers > config: arm64-randconfig-004-20241120 (https://download.01.org/0day-ci/archive/20241120/202411201857.ZNudtGJl-lkp@intel.com/config) > compiler: aarch64-linux-gcc (GCC) 14.2.0 > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241120/202411201857.ZNudtGJl-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot > | Closes: https://lore.kernel.org/oe-kbuild-all/202411201857.ZNudtGJl-lkp@intel.com/ > > All errors (new ones prefixed by >>): > > In file included from : > arch/arm64/kvm/nested.c: In function 'set_sysreg_masks': > >> include/linux/compiler_types.h:517:45: error: call to '__compiletime_assert_845' declared with attribute error: BUILD_BUG_ON failed: !__builtin_constant_p(sr) That's annoying. CONFIG_CC_OPTIMIZE_FOR_SIZE=y is what generates the (legitimate) breakage. The hack below addresses it. M. diff --git a/arch/arm64/kvm/nested.c b/arch/arm64/kvm/nested.c index aeaa6017ffd89..9b36218b48def 100644 --- a/arch/arm64/kvm/nested.c +++ b/arch/arm64/kvm/nested.c @@ -951,7 +951,7 @@ u64 kvm_vcpu_apply_reg_masks(const struct kvm_vcpu *vcpu, return v; } -static void set_sysreg_masks(struct kvm *kvm, int sr, u64 res0, u64 res1) +static __always_inline void set_sysreg_masks(struct kvm *kvm, int sr, u64 res0, u64 res1) { int i = sr - __SANITISED_REG_START__; -- Without deviation from the norm, progress is not possible.