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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 06E6BC48BDF for ; Thu, 24 Jun 2021 09:56:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DCFFB613F7 for ; Thu, 24 Jun 2021 09:55:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232180AbhFXJ6R (ORCPT ); Thu, 24 Jun 2021 05:58:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232200AbhFXJ6M (ORCPT ); Thu, 24 Jun 2021 05:58:12 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79A84C061756 for ; Thu, 24 Jun 2021 02:55:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: Subject:Cc:To:From:Date:Message-ID:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To; bh=C5VHBCy+lz0omv2rSNouf2o5sxcp3gBXQhRid3xvQhQ=; b=hOIouiSPmC4Ju5tTpPibMJOEv2 DP2qo/ulUioN0pWpmHnar4WTscrw1wgNiwWWPS09eOfut0dRleRt6ieBW1lO01y6lvkjOBupRiWEk VQQcjT0QsxItdiz1XgU0yVn0a9yCb3/+66uu7UbOZQHIhmqRzh3Otc6SiYENcErXf99/r6z21REwZ M/y/oUg/DnPQdBl7sM/8SjllJLJyLk4GQtvRE6AqhMbhtyANnqLe4wU7rrWJEsoDS8WKOEgiXH5Wp e/pMtqM5tO8fgdjZLaeonxUL5LToYf95Nynw3DH/8dFRG8NWPNfUxcd3CIzBE1MzmEoX3ZiR4OSy6 inPcfwXg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwM40-00GQOW-Sf; Thu, 24 Jun 2021 09:54:28 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id D6734300258; Thu, 24 Jun 2021 11:54:23 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id A5F462BC05F2C; Thu, 24 Jun 2021 11:54:23 +0200 (CEST) Message-ID: <20210624095147.880513802@infradead.org> User-Agent: quilt/0.66 Date: Thu, 24 Jun 2021 11:41:03 +0200 From: Peter Zijlstra To: jpoimboe@redhat.com, tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, joro@8bytes.org, boris.ostrovsky@oracle.com, jgross@suse.com, x86@kernel.org, mbenes@suse.com, rostedt@goodmis.org, dvyukov@google.com, elver@google.com Subject: [PATCH v2 04/24] x86/kvm: Always inline sev_*guest() References: <20210624094059.886075998@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org vmlinux.o: warning: objtool: svm_vcpu_enter_exit()+0x4d: call to sev_es_guest() leaves .noinstr.text section vmlinux.o: warning: objtool: svm_vcpu_enter_exit()+0x50: call to sev_guest() leaves .noinstr.text section Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/kvm/svm/svm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/arch/x86/kvm/svm/svm.h +++ b/arch/x86/kvm/svm/svm.h @@ -204,12 +204,12 @@ DECLARE_PER_CPU(struct svm_cpu_data *, s void recalc_intercepts(struct vcpu_svm *svm); -static inline struct kvm_svm *to_kvm_svm(struct kvm *kvm) +static __always_inline struct kvm_svm *to_kvm_svm(struct kvm *kvm) { return container_of(kvm, struct kvm_svm, kvm); } -static inline bool sev_guest(struct kvm *kvm) +static __always_inline bool sev_guest(struct kvm *kvm) { #ifdef CONFIG_KVM_AMD_SEV struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info; @@ -220,7 +220,7 @@ static inline bool sev_guest(struct kvm #endif } -static inline bool sev_es_guest(struct kvm *kvm) +static __always_inline bool sev_es_guest(struct kvm *kvm) { #ifdef CONFIG_KVM_AMD_SEV struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info;