From nobody Tue Feb 10 02:48:46 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=pass; 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=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1610752303; cv=none; d=zohomail.com; s=zohoarc; b=j47oTB1YCYQ/as6R3MEUs/PWB05Lm6NRHMT7/mYt5eOsmKDUcQQPGBB266yh5Cs8paPwc+qg0JOgR2MBg0Pm/544CHgd/pVYweRU0yKbt0GZAUO9rl3D/VZJdwGjM1eEcj/PrSJhf49hCjtZcHkWUm3InxNjtic5S4xomwbZnz4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610752303; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=COmX1QEQnOm8A3zypfcBvp8jJhOMlgZyQPnimV7HNNo=; b=NgwG0l/NqKzYdos0e1Nq/LH3WndBNXSCpELnif15+JBJNCkwcNEGN/c+QDAwXwdvFsNj0fjs4r+5sfw9oW1EeyrJXLuoZlHx9hnnzgz6eqfYkeBHoTMS9W70TEdHx/dX2Nx/33iY9D4a04qCKo57ctdRX6I8p6DZnhHZWhNGLCs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=reject dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1610752303490887.0463621220769; Fri, 15 Jan 2021 15:11:43 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.68831.123351 (Exim 4.92) (envelope-from ) id 1l0YFQ-0005yB-Hq; Fri, 15 Jan 2021 23:11:16 +0000 Received: by outflank-mailman (output) from mailman id 68831.123351; Fri, 15 Jan 2021 23:11:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l0YFQ-0005y1-Ar; Fri, 15 Jan 2021 23:11:16 +0000 Received: by outflank-mailman (input) for mailman id 68831; Fri, 15 Jan 2021 23:11:15 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l0YFP-0005vh-D3 for xen-devel@lists.xenproject.org; Fri, 15 Jan 2021 23:11:15 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1f55a9db-672a-42a0-9d96-32b0276fc11a; Fri, 15 Jan 2021 23:11:07 +0000 (UTC) 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" X-Inumbo-ID: 1f55a9db-672a-42a0-9d96-32b0276fc11a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1610752267; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fygCPvuaHloKWc6XP3jLPfZcdHpf7Ee8rM9SEUn8eHs=; b=Aek3vRHuYtvm0kW6tbjksWrpqvOsRLefXsKVBQJaBs79tTbn3/uSKmaL NpVA+BDJm0IyvrbXw8hkKsjfFCaqQrQK8zQu7IOS1i6/kNl/KlImg5a6B iBn95Umy45sGVx7csTX/EsmcrcrthGpq30CbT2f36N5C4uCmCaNImrZd3 Y=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: U7jt1l8EztSXAKskEQujdVsvtWXihy4Dpggy/GRYdu6r7tGXptQfjzIRIw5AjEclWW34q+m+VX be6mfP0/alNAyMiEUCnIN30Gz4cp3JNNE0ZFqm0w9IuDfion2X6ki1AYq/+E63w7Ny86FxbnXO lrTrukgmz+/VyUTzZNQz6OFS5t26MEsgb/HJgHZsP/+0SP9kgGj+WpaMlNNL58yMjhxcWLbofo uc16V+vXJ1ZSTlYsNdhYUv4NdYMPrj+K/5ct084kTDh1Fq1r7vyPhyRGOPb4hx+bNa6j3eZSbZ Fc0= X-SBRS: 5.1 X-MesageID: 36513456 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.79,350,1602561600"; d="scan'208";a="36513456" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , Marek Kasiewicz , =?UTF-8?q?Norbert=20Kami=C5=84ski?= , Michal Zygowski , Piotr Krol , Krystian Hebel , "Daniel P . Smith" , Rich Persaud , Christopher Clark Subject: [PATCH 1/3] x86/smpboot: Re-position the call to tboot_wake_ap() Date: Fri, 15 Jan 2021 23:10:44 +0000 Message-ID: <20210115231046.31785-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20210115231046.31785-1-andrew.cooper3@citrix.com> References: <20210115231046.31785-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) So all the moving parts are in one function. No functional change. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Wei Liu CC: Marek Kasiewicz CC: Norbert Kami=C5=84ski CC: Michal Zygowski CC: Piotr Krol CC: Krystian Hebel CC: Daniel P. Smith CC: Rich Persaud CC: Christopher Clark --- xen/arch/x86/smpboot.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c index 67e727cebd..9eca452ce1 100644 --- a/xen/arch/x86/smpboot.c +++ b/xen/arch/x86/smpboot.c @@ -426,6 +426,13 @@ static int wakeup_secondary_cpu(int phys_apicid, unsig= ned long start_eip) int maxlvt, timeout, i; =20 /* + * Some versions of tboot might be able to handle the entire wake sequ= ence + * on our behalf. + */ + if ( tboot_in_measured_env() && tboot_wake_ap(phys_apicid, start_eip) ) + return 0; + + /* * Be paranoid about clearing APIC errors. */ apic_write(APIC_ESR, 0); @@ -570,8 +577,7 @@ static int do_boot_cpu(int apicid, int cpu) set_cpu_state(CPU_STATE_INIT); =20 /* Starting actual IPI sequence... */ - if ( !tboot_in_measured_env() || tboot_wake_ap(apicid, start_eip) ) - boot_error =3D wakeup_secondary_cpu(apicid, start_eip); + boot_error =3D wakeup_secondary_cpu(apicid, start_eip); =20 if ( !boot_error ) { --=20 2.11.0