From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: "Peter Oberparleiter" <oberpar@linux.ibm.com>,
"Mikhail Zaslonko" <zaslonko@linux.ibm.com>,
"Thomas Weißschuh" <linux@weissschuh.net>
Cc: Steffen Klassert <steffen.klassert@secunet.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Masahiro Yamada <masahiroy@kernel.org>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>,
Pavel Tikhomirov <ptikhomirov@virtuozzo.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Konstantin Khorenko <khorenko@virtuozzo.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH v3 3/4] iommu/generic_pt: disable GCOV for iommu_amdv1.o
Date: Wed, 1 Apr 2026 17:20:19 +0300 [thread overview]
Message-ID: <20260401142020.1434243-4-khorenko@virtuozzo.com> (raw)
In-Reply-To: <20260401142020.1434243-1-khorenko@virtuozzo.com>
With -fprofile-update=atomic in global CFLAGS_GCOV, GCC cannot
constant-fold FIELD_PREP() expressions inside deeply inlined page table
walker functions. GCC creates .constprop clones of the inline level
functions, which get their own GCOV instrumentation that prevents
constant evaluation of compile-time checks.
__no_profile cannot be used here because the entire call chain is
__always_inline functions generated by PT_MAKE_LEVELS() macro, and GCC's
constprop cloning creates new profiled function bodies that bypass the
attribute.
Disable GCOV for iommu_amdv1.o to allow BUILD_BUG_ON / FIELD_PREP
compile-time checks to succeed.
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
drivers/iommu/generic_pt/fmt/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/generic_pt/fmt/Makefile b/drivers/iommu/generic_pt/fmt/Makefile
index 976b49ec97dc..0305f7fb9e35 100644
--- a/drivers/iommu/generic_pt/fmt/Makefile
+++ b/drivers/iommu/generic_pt/fmt/Makefile
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
+GCOV_PROFILE_iommu_amdv1.o := n
+
iommu_pt_fmt-$(CONFIG_IOMMU_PT_AMDV1) += amdv1
iommu_pt_fmt-$(CONFIG_IOMMUFD_TEST) += mock
--
2.43.5
next prev parent reply other threads:[~2026-04-01 14:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 14:20 [PATCH v3 0/4] gcov: use -fprofile-update=atomic globally to fix concurrent access crashes on GCOV-enabled kernels Konstantin Khorenko
2026-04-01 14:20 ` [PATCH v3 1/4] net: fix skb_ext_total_length() BUILD_BUG_ON with CONFIG_GCOV_PROFILE_ALL Konstantin Khorenko
2026-04-01 14:20 ` [PATCH v3 2/4] net: add __no_profile to skb_extensions_init() for GCOV compatibility Konstantin Khorenko
2026-04-01 14:20 ` Konstantin Khorenko [this message]
2026-04-01 14:20 ` [PATCH v3 4/4] gcov: use atomic counter updates to fix concurrent access crashes Konstantin Khorenko
2026-04-01 16:55 ` Peter Oberparleiter
2026-04-02 1:46 ` [PATCH v3 0/4] gcov: use -fprofile-update=atomic globally to fix concurrent access crashes on GCOV-enabled kernels Jakub Kicinski
2026-04-02 12:48 ` Konstantin Khorenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260401142020.1434243-4-khorenko@virtuozzo.com \
--to=khorenko@virtuozzo.com \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=herbert@gondor.apana.org.au \
--cc=horms@kernel.org \
--cc=jpoimboe@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=masahiroy@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oberpar@linux.ibm.com \
--cc=pabeni@redhat.com \
--cc=ptikhomirov@virtuozzo.com \
--cc=steffen.klassert@secunet.com \
--cc=vasileios.almpanis@virtuozzo.com \
--cc=zaslonko@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox