From nobody Sat Jun 20 00:59:55 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3485C433F5 for ; Thu, 24 Mar 2022 18:36:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352748AbiCXSi1 (ORCPT ); Thu, 24 Mar 2022 14:38:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243007AbiCXShv (ORCPT ); Thu, 24 Mar 2022 14:37:51 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 490FCB8212 for ; Thu, 24 Mar 2022 11:36:19 -0700 (PDT) Received: from zn.tnic (p2e55dff8.dip0.t-ipconnect.de [46.85.223.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id E6D5A1EC064D; Thu, 24 Mar 2022 19:36:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1648146978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FHbaewdQrmtEVCXaKAQngIcqqKfzYTCQIr5noHjEhwM=; b=NZrEyS+hazxucQY4zq1BgShVdzf5yEFH2pdw2yrmHJAzTQHj0cTRYz2Reh4890QrPkCQYg 1W7xD71pSS1TvJLiPhsCJ1fNNUXBIUrOJ39zel54gDN1Zrg/Rcg27b3DQPa/CI2lhSLKxq 0PCwwXeWS8E4jZYYpsVLd2hwVp9pDzI= From: Borislav Petkov To: X86 ML Cc: LKML Subject: [PATCH 1/3] task_stack, x86/cea: Force-inline stack helpers Date: Thu, 24 Mar 2022 19:36:05 +0100 Message-Id: <20220324183607.31717-2-bp@alien8.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220324183607.31717-1-bp@alien8.de> References: <20220324183607.31717-1-bp@alien8.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Borislav Petkov Force-inline two stack helpers to fix the following objtool warnings: vmlinux.o: warning: objtool: in_task_stack()+0xc: call to task_stack_page= () leaves .noinstr.text section vmlinux.o: warning: objtool: in_entry_stack()+0x10: call to cpu_entry_sta= ck() leaves .noinstr.text section Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) --- arch/x86/include/asm/cpu_entry_area.h | 2 +- include/linux/sched/task_stack.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/cpu_entry_area.h b/arch/x86/include/asm/c= pu_entry_area.h index dd5ea1bdf04c..75efc4c6f076 100644 --- a/arch/x86/include/asm/cpu_entry_area.h +++ b/arch/x86/include/asm/cpu_entry_area.h @@ -143,7 +143,7 @@ extern void cea_set_pte(void *cea_vaddr, phys_addr_t pa= , pgprot_t flags); =20 extern struct cpu_entry_area *get_cpu_entry_area(int cpu); =20 -static inline struct entry_stack *cpu_entry_stack(int cpu) +static __always_inline struct entry_stack *cpu_entry_stack(int cpu) { return &get_cpu_entry_area(cpu)->entry_stack_page.stack; } diff --git a/include/linux/sched/task_stack.h b/include/linux/sched/task_st= ack.h index d10150587d81..1009b6b5ce40 100644 --- a/include/linux/sched/task_stack.h +++ b/include/linux/sched/task_stack.h @@ -16,7 +16,7 @@ * try_get_task_stack() instead. task_stack_page will return a pointer * that could get freed out from under you. */ -static inline void *task_stack_page(const struct task_struct *task) +static __always_inline void *task_stack_page(const struct task_struct *tas= k) { return task->stack; } --=20 2.35.1 From nobody Sat Jun 20 00:59:55 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 031E9C433F5 for ; Thu, 24 Mar 2022 18:36:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352729AbiCXSiV (ORCPT ); Thu, 24 Mar 2022 14:38:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346271AbiCXShw (ORCPT ); Thu, 24 Mar 2022 14:37:52 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBF66B8213; Thu, 24 Mar 2022 11:36:19 -0700 (PDT) Received: from zn.tnic (p2e55dff8.dip0.t-ipconnect.de [46.85.223.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 8D8171EC064F; Thu, 24 Mar 2022 19:36:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1648146978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wfT4qGrQwx2hfzVPs3pjnTLNsfyPOU9+w/XLbsoJcyc=; b=AnvFSo7qHBKE8Lir2/yiBZMNvznDG5kkwV9CXLQqyGibSBy8i1FCyZRtXQTEfrbAmdvbIo DKGP6T537uf3K/NqE70oBQOS3sdhBo/M056YQg3iIGY7SXu8cqPvG06AHoQIC7V3CUIup2 cmQNSOqRbk8d2PiT/hQbBl7Ufaf4B7k= From: Borislav Petkov To: X86 ML Cc: LKML , kvm@vger.kernel.org Subject: [PATCH 2/3] x86/kvm/svm: Force-inline GHCB accessors Date: Thu, 24 Mar 2022 19:36:06 +0100 Message-Id: <20220324183607.31717-3-bp@alien8.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220324183607.31717-1-bp@alien8.de> References: <20220324183607.31717-1-bp@alien8.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Borislav Petkov In order to fix: vmlinux.o: warning: objtool: __sev_es_nmi_complete()+0x4c: call to ghcb_s= et_sw_exit_code() leaves .noinstr.text section Signed-off-by: Borislav Petkov Cc: kvm@vger.kernel.org Acked-by: Peter Zijlstra (Intel) --- arch/x86/include/asm/svm.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h index bb2fb78523ce..eab0749262b7 100644 --- a/arch/x86/include/asm/svm.h +++ b/arch/x86/include/asm/svm.h @@ -436,23 +436,23 @@ struct vmcb { (offsetof(struct vmcb_save_area, field) / sizeof(u64)) =20 #define DEFINE_GHCB_ACCESSORS(field) \ - static inline bool ghcb_##field##_is_valid(const struct ghcb *ghcb) \ + static __always_inline bool ghcb_##field##_is_valid(const struct ghcb *gh= cb) \ { \ return test_bit(GHCB_BITMAP_IDX(field), \ (unsigned long *)&ghcb->save.valid_bitmap); \ } \ \ - static inline u64 ghcb_get_##field(struct ghcb *ghcb) \ + static __always_inline u64 ghcb_get_##field(struct ghcb *ghcb) \ { \ return ghcb->save.field; \ } \ \ - static inline u64 ghcb_get_##field##_if_valid(struct ghcb *ghcb) \ + static __always_inline u64 ghcb_get_##field##_if_valid(struct ghcb *ghcb)= \ { \ return ghcb_##field##_is_valid(ghcb) ? ghcb->save.field : 0; \ } \ \ - static inline void ghcb_set_##field(struct ghcb *ghcb, u64 value) \ + static __always_inline void ghcb_set_##field(struct ghcb *ghcb, u64 value= ) \ { \ __set_bit(GHCB_BITMAP_IDX(field), \ (unsigned long *)&ghcb->save.valid_bitmap); \ --=20 2.35.1 From nobody Sat Jun 20 00:59:55 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C543EC433EF for ; Thu, 24 Mar 2022 18:36:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243928AbiCXSiT (ORCPT ); Thu, 24 Mar 2022 14:38:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347480AbiCXShw (ORCPT ); Thu, 24 Mar 2022 14:37:52 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 848CCB8214 for ; Thu, 24 Mar 2022 11:36:20 -0700 (PDT) Received: from zn.tnic (p2e55dff8.dip0.t-ipconnect.de [46.85.223.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 2D0F01EC0651; Thu, 24 Mar 2022 19:36:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1648146979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U1Rvq88SshyAxMsduaB8chen/xtMUQxQ1mrNlILofXc=; b=KbaKJINE8WGXFToXFdh4H9Cvo3w6+/3R0sk5KkLnRIgjDe2viE/4vQEpWJFPh8JgqsaKQI A5UeTRiOFEbgUD9NQ36kDg8m5/Z6ZD8DSfZcsVFycdX+K9JfNy4xfKzhM+aB3UzdsJvcRR NGH2zIu0T6yYI8yFUmYxUuk2p3glNV8= From: Borislav Petkov To: X86 ML Cc: LKML Subject: [PATCH 3/3] x86/mm: Force-inline __phys_addr_nodebug() Date: Thu, 24 Mar 2022 19:36:07 +0100 Message-Id: <20220324183607.31717-4-bp@alien8.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220324183607.31717-1-bp@alien8.de> References: <20220324183607.31717-1-bp@alien8.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Borislav Petkov Fix: vmlinux.o: warning: objtool: __sev_es_nmi_complete()+0x8b: call to __phys= _addr_nodebug() leaves .noinstr.text section Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) --- arch/x86/include/asm/page_64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/page_64.h b/arch/x86/include/asm/page_64.h index e9c86299b835..baa70451b8df 100644 --- a/arch/x86/include/asm/page_64.h +++ b/arch/x86/include/asm/page_64.h @@ -16,7 +16,7 @@ extern unsigned long page_offset_base; extern unsigned long vmalloc_base; extern unsigned long vmemmap_base; =20 -static inline unsigned long __phys_addr_nodebug(unsigned long x) +static __always_inline unsigned long __phys_addr_nodebug(unsigned long x) { unsigned long y =3D x - __START_KERNEL_map; =20 --=20 2.35.1