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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 588C7C54EE9 for ; Tue, 20 Sep 2022 08:24:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230116AbiITIYM (ORCPT ); Tue, 20 Sep 2022 04:24:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231372AbiITIXD (ORCPT ); Tue, 20 Sep 2022 04:23:03 -0400 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C2CA6581B for ; Tue, 20 Sep 2022 01:20:51 -0700 (PDT) Received: by mail-pg1-x52b.google.com with SMTP id u69so1831478pgd.2 for ; Tue, 20 Sep 2022 01:20:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=VQpZRPjw97dLIW56sK+yQ0p4A8fqcnFL6FG6rvfKDvs=; b=Xt70jeatjEGHB9EdIqy92nlbkciC6fZlZYjqNoH+QKx8/l1yhaspy+XgHws9D61sOb WYK615yf16Hu8C3OnG8qdFWCJzdlpGMwHrGuMJvHKiwtA70LjZ5Xfo/YMjCbOzTrrktr cLkWAgbOk3E5wnQpUP235mzzn8fG6HNWn8gGk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=VQpZRPjw97dLIW56sK+yQ0p4A8fqcnFL6FG6rvfKDvs=; b=avyR9gO11XJ5exl92ZdefYFlNJpaL737ZtGiAcOKkfBn2CChubtjz0NSRGudbuUYVW uHUUQJ7+hVvSmb9IhvmO36iTkyb021jQmwSIzs8NbmxiS62qxPsEDKewRx8qdTdVHJ85 pePgqLb2867aRUGBq1BQM3CTcKC/IP2AIu8Vk3UdnrlyJjZIqFdOswMaZ9TQZ1t6WCMU MxLZaBSkl4czogPjbohUmkGdgBpkEkkgD7YBsQHlPQNGgM0XOJbGNhlv2AH0QEdzeWqB lBz8zJ/3N/tu2YmRqvftJz/GoBkl9dimP+c916nt7JAMTEfYi2F3OT3ETIiO+5ql2/5Q Ci2w== X-Gm-Message-State: ACrzQf1X/Qq5Z0IEgalUiHIZnQygrus8iYIs2vkn1wS5iE7sIaMiNVJA bISfRuPc4UqPE3ESZ5sS7LCzUg== X-Google-Smtp-Source: AMsMyM4rATdCzBtbaTbAdmV/XQanotaAz+eodIb2aEN5mTYDvcY/JSVpRneYmgaVzGvZe9+kOHwPTg== X-Received: by 2002:a63:d905:0:b0:439:c930:85a5 with SMTP id r5-20020a63d905000000b00439c93085a5mr15724205pgg.474.1663662050133; Tue, 20 Sep 2022 01:20:50 -0700 (PDT) Received: from localhost ([2620:15c:2ce:200:3001:aa57:999b:fd4a]) by smtp.gmail.com with UTF8SMTPSA id 14-20020a17090a0cce00b001fd9c63e56bsm1820259pjt.32.2022.09.20.01.20.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Sep 2022 01:20:49 -0700 (PDT) From: Denis Nikitin To: Marc Zyngier , Catalin Marinas , Will Deacon Cc: James Morse , Alexandru Elisei , Nick Desaulniers , Manoj Gupta , David Brazdil , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, Denis Nikitin Subject: [PATCH] KVM: arm64: nvhe: Disable profile optimization Date: Tue, 20 Sep 2022 01:20:05 -0700 Message-Id: <20220920082005.2459826-1-denik@chromium.org> X-Mailer: git-send-email 2.37.3.968.ga6b4b080e4-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Kernel build with -fprofile-sample-use raises the following failure: error: arch/arm64/kvm/hyp/nvhe/kvm_nvhe.tmp.o: Unexpected SHT_REL section ".rel.llvm.call-graph-profile" SHT_REL is generated by the latest lld, see https://reviews.llvm.org/rGca3bdb57fa1ac98b711a735de048c12b5fdd8086. Disable profile optimization in kvm/nvhe to fix the build with AutoFDO. Signed-off-by: Denis Nikitin --- arch/arm64/kvm/hyp/nvhe/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/kvm/hyp/nvhe/Makefile b/arch/arm64/kvm/hyp/nvhe/Makefile index b5c5119c7396..6a6188374a52 100644 --- a/arch/arm64/kvm/hyp/nvhe/Makefile +++ b/arch/arm64/kvm/hyp/nvhe/Makefile @@ -89,6 +89,9 @@ quiet_cmd_hypcopy = HYPCOPY $@ # Remove ftrace, Shadow Call Stack, and CFI CFLAGS. # This is equivalent to the 'notrace', '__noscs', and '__nocfi' annotations. KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_FTRACE) $(CC_FLAGS_SCS) $(CC_FLAGS_CFI), $(KBUILD_CFLAGS)) +# Profile optimization creates SHT_REL section '.llvm.call-graph-profile' for +# the hot code. SHT_REL is currently not supported by the KVM tools. +KBUILD_CFLAGS += $(call cc-option,-fno-profile-sample-use,-fno-profile-use) # KVM nVHE code is run at a different exception code with a different map, so # compiler instrumentation that inserts callbacks or checks into the code may -- 2.37.3.968.ga6b4b080e4-goog