From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE0232F746D for ; Fri, 3 Apr 2026 16:07:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775232454; cv=none; b=RB4Yn0z0U2xcvMESo0O83VsjdOc9eqcwdm9RnBZThmscDB21NpwiEer3Q/9nEjqsXDju1Q96Dn3u52wmQcLsRkpcELIn6UKImZyDoUHSfqkXnBdxi/Nd+eNNbwFyAMOUtvy1baURHFOo/JhO10kVn1WEIZ3WXI8XyjFpf/lq7ho= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775232454; c=relaxed/simple; bh=9//i/l/99yq+vnARHHYnQK2GDVb2B+L5A462BYB1OAQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TYqL25h9ayicWdzjMs3Nie+UJT6EbevnF2xVQHrXwTsDVHu10tyWpQffIyhSnWQksv1BHPNgSTr15b5pCb8I472WkhjnN3cwqRo2sM7gY5Xq65/F4FBrJvZ0JWkqgREwoD1QC68+LaWb2ZOWREuhMYqlG4nJ/fY3yjs21szvjDI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=B69gZonH; arc=none smtp.client-ip=209.85.160.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="B69gZonH" Received: by mail-qt1-f171.google.com with SMTP id d75a77b69052e-506362ac5f7so17564551cf.1 for ; Fri, 03 Apr 2026 09:07:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1775232451; x=1775837251; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=GoRjrzwsrBkq63H71O5T18FssH5et47xTHlFEqom36Q=; b=B69gZonH8mrblZ8egPX4d6CSmc1GFeIe0GdFVXah/e4KlMFTd8rngj6gPKqcgUFZ/5 +DC/vwDaL0BekHbAt5Y1TKPNDzZNrO7aKybklVQ1SeCFFiSr+kNQ7U+Ejt99Q1FrTj0W c+LyGhx4bmQlBBMBhwdhaDUvhIVCojSqnfN19o2mPlVq1LmIkx77vYm5lNP4Ybr/LqqC UjiAWp9G07D5EoyYOrc5ierCKuyCJzCgtH8MuU4Ti1dfWPWYhHbYgkaGyIx1G2JSBWGF b2QLbDnA4Jbu6Rb0ImEW/ECg8hvhyJr8704OX/lk/zwApomQmxhTy1waveMc7QtcgaS4 hbqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775232451; x=1775837251; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GoRjrzwsrBkq63H71O5T18FssH5et47xTHlFEqom36Q=; b=p+pFp4ydsM9Fy7zXyQsXkKeoVT/E6dezqxlGzqIEGgHyzkQ4/x+KteMH2AckzlbUJ6 Z8+UGMdvuAvhqjJIK4oD1MD68XsXT5I4ZW6TjurK7iSgWJ9ssXbmeU98iZHLlOH7aUzD ZPRa1sO/k94FS5Ul+HmAnlwyFpsgtseivfY5RPQptDd227rrKsoM87f482B5mt8ZYlWj s7hsb6zbCoI6DQt8tWQbGfq7qvwYWzGqv1bFcIfT6PtU9Ku6AUcTVh1X0fONSgVoN3g3 Fm7QelhLk2o/oP7DGlJ7NmfKc3miayzK6nJapaWJB6apNz+Hc2lVnAvS4s2xXsHocbt+ FLaQ== X-Forwarded-Encrypted: i=1; AJvYcCUel9u3l3633Cx2fVSpSrpWRkpYUhe90m+Vmr04V7IbKOQgJbYvwsj8+KJgIDXHi1Y+UV0lqLb+xT50xFk=@vger.kernel.org X-Gm-Message-State: AOJu0YxetwT4p5cxS7I+e6WG24N1Qz2X3lsREGPNIYZXxrHiYaIlpGy9 BhaUTAbVIxUSzjGRSY1esldRpX0qVSzoBpTu3wyz90rfVwWkOGFBzRoje5P9NLlEEGQ= X-Gm-Gg: ATEYQzxPSlpgXDql2+sQeQaFrQKcx4VzBxLZYdcHh+nCUSJVp43fZmd2u5qwrBKNhUG A0YIjE6QfCwI56PvIaKyiPMI8R0uuwrel9RXY5eePbFhbarMcLDHBnIzsd5o/61XFuYzxZmL4z/ iKED59NeCx/ujHkNvuIWqpQPMOqqA4qamU2gI7nBsL5QgVQcu5eKEfn6RVuIbvu4H/Z108+Bfg0 /+ZisR8Bn8KsenJcUtJuot1xAgElNEv8gga5CuTyOyRRqpxVRLujdcv9f8kAcLfpDaSAsTluVMq +GVS2X9MCPGvq60pLr2C8tfbIgbuhW8HhTi7eabZrnHPiw3sAG5iZjbAf+O2/7hMb1VcWBHrLNp WTHi9OG+ixGUQpHTEVFqyQcBmIv7kADudcKk8UfpE8ZCqCbgBHl5fe5b3wqw3Ty63qLWhXLCg/O 8PMEifDcgdpsANPucwcq5maH1SYDWYHISdmCOq2Da74fi1qmBqMQtaT3bcqZ82Lgd+eAeOcg== X-Received: by 2002:ac8:5f90:0:b0:509:3257:c050 with SMTP id d75a77b69052e-50d6278f405mr52196981cf.24.1775232451465; Fri, 03 Apr 2026 09:07:31 -0700 (PDT) Received: from ziepe.ca (mctnnbsa70w-159-2-73-22.dhcp-dynamic.fibreop.nb.bellaliant.net. [159.2.73.22]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-50d4b1a739dsm48217621cf.1.2026.04.03.09.07.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Apr 2026 09:07:30 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1w8h3R-0000000Cnh8-3mSR; Fri, 03 Apr 2026 13:07:29 -0300 Date: Fri, 3 Apr 2026 13:07:29 -0300 From: Jason Gunthorpe To: Konstantin Khorenko Cc: Joerg Roedel , Will Deacon , Robin Murphy , Kevin Tian , Peter Oberparleiter , Mikhail Zaslonko , iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Pavel Tikhomirov , Vasileios Almpanis , Thomas =?utf-8?Q?Wei=C3=9Fschuh?= Subject: Re: [PATCH] iommu/generic_pt: disable GCOV for iommu_amdv1.o Message-ID: <20260403160729.GC2551565@ziepe.ca> References: <20260402141012.1437095-1-khorenko@virtuozzo.com> <20260402141012.1437095-2-khorenko@virtuozzo.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260402141012.1437095-2-khorenko@virtuozzo.com> On Thu, Apr 02, 2026 at 05:10:12PM +0300, Konstantin Khorenko wrote: > 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. That's hasn't been the issue here. gcc gets confused where it thinks a value is constant so the builtin_constant checks inside FIELD_PREP trigger, but if the value is constant then control flow leading up to it excludes that path ever happening. Somehow gcov is breaking the elimination of the impossible branch, and I think this is all just compiler bugs. Also, I thought this was fixed by adding the always_inline? Jason