From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 718053F4853 for ; Wed, 1 Jul 2026 23:14:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.97.179.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782947661; cv=none; b=pG6RF1I6cLNcw1aDPON1zLdy0Ut6AEo6tt+t+X/rcSLNovJ09jfdUvmDkq7UxdNRlOSXa3eGdqhfv74NG/n/aetBnd0EF28Ez+ZciQCYbZ+RtzVweuwRd/1CrXk655cjTmRBc23T6cMhiWqLAEELDG/U40J8vla0ITfuc3u3yuY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782947661; c=relaxed/simple; bh=tVuJTrndrhWukjL2JH+r8Z+UgyP7i4IP5gkTm3V37Hs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CZNevLeaHWpkT809cAbjpB41vgCi97WdEC9zz7Dw419yRIRbdgdV2/AgQqfZ49kSso4+Ow13IiBKmWPUE65GYGg9VFSmHo7TmBHPqQgJyHgjDLZI1K4Y4q5m4gYpXWPvOgefLRAVktxa8QW+0cc7BM/za8UPjlGOBpkp1BIy/3c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=LyfYNQL6; arc=none smtp.client-ip=213.97.179.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="LyfYNQL6" 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==; 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 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() 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="utf-8" Content-Transfer-Encoding: 7bit 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 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/enlighten.c index f2053cbe9b0ce3d2178938269607c652ae8f528e..cb442cbd9d828619421babb281bfe9759edbca8a 100644 --- a/arch/x86/platform/pvh/enlighten.c +++ b/arch/x86/platform/pvh/enlighten.c @@ -8,6 +8,7 @@ #include #include #include +#include #include @@ -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)); hypervisor_specific_init(xen_guest); -- 2.47.3