From patchwork Mon Jul 3 13:00:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 13300046 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 81C8CEB64DC for ; Mon, 3 Jul 2023 13:01:01 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.558085.871897 (Exim 4.92) (envelope-from ) id 1qGJAU-0005mz-Kw; Mon, 03 Jul 2023 13:00:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 558085.871897; Mon, 03 Jul 2023 13:00:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qGJAU-0005ms-Gd; Mon, 03 Jul 2023 13:00:38 +0000 Received: by outflank-mailman (input) for mailman id 558085; Mon, 03 Jul 2023 13:00:37 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qGJAT-0005ml-Ks for xen-devel@lists.xenproject.org; Mon, 03 Jul 2023 13:00:37 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 9997a690-19a1-11ee-8611-37d641c3527e; Mon, 03 Jul 2023 15:00:35 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E3FD2218F3; Mon, 3 Jul 2023 13:00:34 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9A656138FC; Mon, 3 Jul 2023 13:00:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 2xVZJHLGomSYCgAAMHmgww (envelope-from ); Mon, 03 Jul 2023 13:00:34 +0000 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" X-Inumbo-ID: 9997a690-19a1-11ee-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1688389234; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=g/qfo8Cb33qUzg9p/sYx93BIkx/lh9MH46SOSdnmyf8=; b=E0ValWnb8323NYs3nZ1reUyn9xcW6UnT/WjrnwfuddpLUbUcW8umrJK2eBg3GMgbEVZlc5 e7Op8WL+1NzVEDBRQL2foLY3SM64CFvRMXs5yP/7PJD1wYpI7+kCyTD72S180Jsu1OyMFY Lwnv8tdJ/g8zVtBTGNEHkHjIPCjEI1g= From: Juergen Gross To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Juergen Gross , Boris Ostrovsky , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , xen-devel@lists.xenproject.org Subject: [PATCH] x86/xen: fix secondary processor fpu initialization Date: Mon, 3 Jul 2023 15:00:32 +0200 Message-Id: <20230703130032.22916-1-jgross@suse.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Moving the call of fpu__init_cpu() from cpu_init() to start_secondary() broke Xen PV guests, as those don't call start_secondary() for APs. Fix that by adding the call of fpu__init_cpu() to cpu_bringup(), which is the Xen PV replacement of start_secondary(). Fixes: b81fac906a8f ("x86/fpu: Move FPU initialization into arch_cpu_finalize_init()") Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky --- arch/x86/xen/smp_pv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/xen/smp_pv.c b/arch/x86/xen/smp_pv.c index d5ae5de2daa2..cef78b8c89f4 100644 --- a/arch/x86/xen/smp_pv.c +++ b/arch/x86/xen/smp_pv.c @@ -63,6 +63,7 @@ static void cpu_bringup(void) cr4_init(); cpuhp_ap_sync_alive(); cpu_init(); + fpu__init_cpu(); touch_softlockup_watchdog(); /* PVH runs in ring 0 and allows us to do native syscalls. Yay! */