Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp31617516rwd; Fri, 7 Jul 2023 01:50:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlEkJZN8jCq5mIZAqtrNonmpCufo6IvlBxE4HXZn23RudbnFomRzTLTZ1+XXN/GKbvgKTBMU X-Received: by 2002:a17:90b:4a85:b0:262:f928:618d with SMTP id lp5-20020a17090b4a8500b00262f928618dmr3138739pjb.35.1688719826984; Fri, 07 Jul 2023 01:50:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688719826; cv=none; d=google.com; s=arc-20160816; b=RdWKLdJl4xWSNjmZhjE8epLsG1XtXUOU2/GxwjsjGQ4QqVRRffoWJVmTLzlxUGJqMG sNaGo/XmjywHWJRULHWS/la8iYkVXWAiwXmp+7FNkFQF9yQuZmCKaq8epOEKS5X3UhtH eGu6iI8bB0jJpaqo5Zhyn3ccIOcbMSzYpsKp1Pk+W6Z10vmPPcPYd9oK0uiDLDc8gxaP yabQiRcGTJWLAmEk+tvSCfXmwA3r7uB3nPcLp0tPvvHhIMy26E4yXpyvrBug41c+pNJJ 5n4Nh+eG7GFGA4Om8xZn566g1wsUXJIgBQW2tq7e4B9TfUxyyCf2ofMfRmwA18Rdw8ci c61Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=qx5Wgf3Rnub5/BSTYIWNYnpxva7xacNTi0DR552B6NI=; fh=oUc/7Lw3E4XzrclvZB1FUKExhvKqWDzt9V56j/ALygo=; b=gUCqP4id5tk7jgSo8rLJDqwWhBJlcACzm638L8Wh6zvb0ahDR4D4tzMDcnyk/viZ6A G53eDLf206nILID2eVfIZDiCI/XBKSVhwxpVAQ+rm1XPLT3ODClmeTEXY/6bxU0piXZi 88xQzVQ+aQvLZ/bo031C6hrfge/8YeSoLTQDpxL5DEJ7trjJX0xBUwTPBX0i8Ch4gL9I bI3otQFIMbAYCKm7l6iZvPmy+8w1gVZqP/xqPy6GRErsm2CWBeaTLLmJImFK2J3bwbDU Z4UQc7DxWNwx0G5nehcgKY/DH37prtaOtHkvyW6LfhcTn+uPg1OWnoxJxR6IBAioXhil Ichg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dw17-20020a17090b095100b0026343b62cdasi1587024pjb.154.2023.07.07.01.50.13; Fri, 07 Jul 2023 01:50:26 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231745AbjGGIoN (ORCPT + 99 others); Fri, 7 Jul 2023 04:44:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229642AbjGGIoM (ORCPT ); Fri, 7 Jul 2023 04:44:12 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 479E31FD8; Fri, 7 Jul 2023 01:44:11 -0700 (PDT) Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 71567603362EB; Fri, 7 Jul 2023 16:43:50 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: seanjc@google.com, pbonzini@redhat.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, x86@kernel.org Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Su Hui Subject: [PATCH] KVM: VMX: Avoid noinstr warning Date: Fri, 7 Jul 2023 16:43:28 +0800 Message-Id: <20230707084328.2563454-1-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 vmlinux.o: warning: objtool: vmx_vcpu_enter_exit+0x2d8: call to vmread_error_trampoline() leaves .noinstr.text section Signed-off-by: Su Hui --- arch/x86/kvm/vmx/vmx_ops.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kvm/vmx/vmx_ops.h b/arch/x86/kvm/vmx/vmx_ops.h index ce47dc265f89..54f86ce2ad60 100644 --- a/arch/x86/kvm/vmx/vmx_ops.h +++ b/arch/x86/kvm/vmx/vmx_ops.h @@ -112,6 +112,7 @@ static __always_inline unsigned long __vmcs_readl(unsigned long field) #else /* !CONFIG_CC_HAS_ASM_GOTO_OUTPUT */ + instrumentation_begin(); asm volatile("1: vmread %2, %1\n\t" ".byte 0x3e\n\t" /* branch taken hint */ "ja 3f\n\t" @@ -139,6 +140,7 @@ static __always_inline unsigned long __vmcs_readl(unsigned long field) _ASM_EXTABLE_TYPE_REG(1b, 2b, EX_TYPE_ONE_REG, %1) : ASM_CALL_CONSTRAINT, "=&r"(value) : "r"(field) : "cc"); + instrumentation_end(); return value; #endif /* CONFIG_CC_HAS_ASM_GOTO_OUTPUT */ -- 2.30.2