From nobody Tue Aug 25 02:51:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=igalia.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1782947677939404.0901428178737; Wed, 1 Jul 2026 16:14:37 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1351039.1608401 (Exim 4.92) (envelope-from ) id 1wf48D-0003OJ-8q; Wed, 01 Jul 2026 23:14:13 +0000 Received: by outflank-mailman (output) from mailman id 1351039.1608401; Wed, 01 Jul 2026 23:14:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wf48D-0003OA-5k; Wed, 01 Jul 2026 23:14:13 +0000 Received: by outflank-mailman (input) for mailman id 1351039; Wed, 01 Jul 2026 23:14:12 +0000 Received: from mx.expurgate.net ([194.145.224.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wf48C-0003Ml-3z for xen-devel@lists.xenproject.org; Wed, 01 Jul 2026 23:14:12 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wf48B-005FMV-H8 for xen-devel@lists.xenproject.org; Thu, 02 Jul 2026 01:14:11 +0200 Received: from [10.42.69.12] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a459f3b-2eae-0a2a0a5409dd-0a2a450cd312-8 for ; Thu, 02 Jul 2026 01:14:11 +0200 Received: from [213.97.179.56] (helo=fanzine2.igalia.com) by tlsNG-d25034.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6a459f42-f399-0a2a450c0019-d561b338ddee-3 for ; Thu, 02 Jul 2026 01:14:11 +0200 Received: from 186-249-148-121.shared.desktop.com.br ([186.249.148.121] helo=[127.0.1.1]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1wf489-007mwb-Nz; Thu, 02 Jul 2026 01:14:09 +0200 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=20170329 header.d=igalia.com header.i="@igalia.com" header.h="Cc:To:In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zBAAE6UPiVcuOT4Hdx5zYoG+Uei+rPkEJSxQ4+nbtAc=; b=LyfYNQL68YUxAdNm6mXIXLHXvL SvZnmfL85NGTH+8BXQ9g1x52pAVD3REn6kbl/gLxrAa9MzZfNFdaQE/4w2v7l+TxDwVIQWG4xsmW/ 7yx1UeqoPM4ju5/4ZCtDx2Bb1QeeBGmPO3a0aVPJ/vmnigebk7s8GJZj8nYkpsWtceICos7DfQlF4 1et53Ds5nmFdXeP2g5X25cyfdWmPt5dSX69y9piQDvvUMhXbAXLH8M6aGpDCpDrQrJb6NhOFyUKxY 7wOkHJKIhpPAwQElHU8EL+N7D4C4QAXIWyWkPXgyLTUZCRThdOiWztw7RXThIUhUmIoS3O7CSTZCL UlaFgGaw==; From: Mauricio Faria de Oliveira Date: Wed, 01 Jul 2026 20:13:53 -0300 Subject: [PATCH v6 4/4] x86/pvh: fix unbootable VMs by really inlining memset() in xen_prepare_pvh() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260701-pvh-kasan-inline-v6-4-ba99045dfa9f@igalia.com> References: <20260701-pvh-kasan-inline-v6-0-ba99045dfa9f@igalia.com> In-Reply-To: <20260701-pvh-kasan-inline-v6-0-ba99045dfa9f@igalia.com> To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Juergen Gross , Alexey Dobriyan , Boris Ostrovsky Cc: kernel-dev@igalia.com, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, Mauricio Faria de Oliveira X-Mailer: b4 0.14.2 X-purgate-ID: tlsNG-d25034/1782947651-93138D51-D82128A4/0/0 X-purgate-type: clean X-purgate-size: 1416 X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1782947680535158500 Even with __builtin the compiler may decide to use the out of line function instead of the inline implementation. This particular one (still) generated the inline implementation as expected (at least in these compiler versions) but this is not guaranteed to remain. Switch the builtin to the inline implementation to address it. Fixes: fbe5a6dfe492 ("xen, pvh: fix unbootable VMs by inlining memset() in = xen_prepare_pvh()") Signed-off-by: Mauricio Faria de Oliveira Reviewed-by: Juergen Gross --- arch/x86/platform/pvh/enlighten.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/platform/pvh/enlighten.c b/arch/x86/platform/pvh/enli= ghten.c index f2053cbe9b0ce3d2178938269607c652ae8f528e..cb442cbd9d828619421babb281b= fe9759edbca8a 100644 --- a/arch/x86/platform/pvh/enlighten.c +++ b/arch/x86/platform/pvh/enlighten.c @@ -8,6 +8,7 @@ #include #include #include +#include =20 #include =20 @@ -129,7 +130,7 @@ void __init xen_prepare_pvh(void) * This must not compile to "call memset" because memset() may be * instrumented. */ - __builtin_memset(&pvh_bootparams, 0, sizeof(pvh_bootparams)); + __inline_memset(&pvh_bootparams, 0, sizeof(pvh_bootparams)); =20 hypervisor_specific_init(xen_guest); =20 --=20 2.47.3