From nobody Mon Feb 9 20:35:12 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=1637932088; cv=none; d=zohomail.com; s=zohoarc; b=mA/T/1PuFK9Q8NApApYOMBBVT+Q8Ap6/lbKd0XidwZ+nqdDrvNM8Z5HURCgOhcBo5jPc4g+UFEAyG8v2SVqXQlh2OOvdftY6WJcj85z4hNeV14hjUtcGfhQ3MKewu5Y1U96Rocx0YJWF+meKdu+X0TNsZ7KiqeO2RiCjluCYLOg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637932088; 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=hEmE9VJ2OyHXWyBu5iJYivl989XWbUHMNz0S6hQ3Uws=; b=h+vTbXgtq2EJIGEf9xGzQWyjrQW8Q/ejnFEVliAtRJKGCV05betRaSQtI2a9AlAfaQo0gaayggzNs/TgjbxIDSqu4yWq5+PJJs2jAgUyA8v0jpTLOOs/zOHcXWJ0eX5M7OHrWcwNAPEz7ip/kQo6g3TXg5hRxku0hhFqVSU0b6c= 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) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1637932088933483.79900435893273; Fri, 26 Nov 2021 05:08:08 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.232859.404034 (Exim 4.92) (envelope-from ) id 1mqaxF-0007Ir-CF; Fri, 26 Nov 2021 13:07:53 +0000 Received: by outflank-mailman (output) from mailman id 232859.404034; Fri, 26 Nov 2021 13:07:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqaxE-0007H7-Kd; Fri, 26 Nov 2021 13:07:52 +0000 Received: by outflank-mailman (input) for mailman id 232859; Fri, 26 Nov 2021 13:07:50 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mqavg-0002zD-CD for xen-devel@lists.xenproject.org; Fri, 26 Nov 2021 13:06:16 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 9fdb31ff-4eb9-11ec-9787-a32c541c8605; Fri, 26 Nov 2021 14:06:11 +0100 (CET) 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: 9fdb31ff-4eb9-11ec-9787-a32c541c8605 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1637931971; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xnOxh2ouMD9YxuVuQeIQxnQYuJC2T33FETvQlA9/bVY=; b=Ok7bv8A75dtngjor7SrVl41xrKPUl02zyOWNP2xGE2WOT4i71JMwkhN9 RK+3Jd73/x/DS8mid/GHic5yyXoili3MCgt8Zr/G+o6x/vVcigMNCNK2t pr//rZ68TdxPJao8fL0ahh0tg06VmlzBSDU9A8HfBHIpdZu2fmCjsXjFm g=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: OZyK3cfFl/Fm6/VFQRlvSPJ8ju/C18rmFwdmN9z+74ENs6E8koK6YiffJE77w3L7mDeT0H0Xab 6hvLhjosfR0bmOSTDofDO5EyBzLadDGsHFFslfIq12Pq/EyQssxVK6WNFqpyM5ja0zuXk6ZrMN qRkGtUGOdpeFaBkBW4IoTc4Vn+cDg3cvAnfMTdAjeSmqB+NOHzIjL3Ctmm1+ElWviGMHDqKvdB xQWzKQz6x7gPqTCbB5WHNKdGV8LHomrkC3afNgM7yhmbRCSqzQc8hkRBrchKrKG7MW8ZKCNh9g NpMsm12s653XIvt08wGoDudO X-SBRS: 5.1 X-MesageID: 60695344 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:rMEQm6/9ga7POMEtV9JlDrUDTXmTJUtcMsCJ2f8bNWPcYEJGY0x3n GZNDTjVbPfcY2WgKdogboiy8hgG7JaByYUxSVNorSo8E34SpcT7XtnIdU2Y0wF+jyHgoOCLy +1EN7Es+ehtFie0Si9AttENlFEkvU2ybuOU5NXsZ2YhGmeIdA970Ug6wrdj3NYy6TSEK1jlV e3a8pW31GCNg1aYAkpMg05UgEoy1BhakGpwUm0WPZinjneH/5UmJMt3yZWKB2n5WuFp8tuSH I4v+l0bElTxpH/BAvv9+lryn9ZjrrT6ZWBigVIOM0Sub4QrSoXfHc/XOdJFAXq7hQllkPhIk Oh2lbuVQDsFBaGWh78BVENoTyhHaPguFL/veRBTsOSWxkzCNXDt3+9vHAc9OohwFuRfWD8Us 6ZCcXZUM07F17neLLGTE4GAguwKKsXxMZxZkXZn1TzDVt4tQIzZQrWM7thdtNs1rp4WQ6eDP JZFAdZpRDT5aTFFP14aMqIFobiRgFDQ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7anUUmKUK5MHGwI1Dtf0rWTpDfI/3DAbv31ZSRFFG/Fw9v re/8jzuiWftN98YhwdcLO7WJVoI0mzyXcd2+B4VotKOjOLhILCFuBfBOXZrAEJ30bFh4tgPW AKSdkdNOHN X-IronPort-AV: E=Sophos;i="5.87,266,1631592000"; d="scan'208";a="60695344" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [PATCH 57/65] x86/setup: Read CR4 earlier in __start_xen() Date: Fri, 26 Nov 2021 12:34:38 +0000 Message-ID: <20211126123446.32324-58-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20211126123446.32324-1-andrew.cooper3@citrix.com> References: <20211126123446.32324-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) X-ZM-MESSAGEID: 1637932089534100001 This is necessary for read_cr4() to function correctly. Move the EFER cach= ing at the same time. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Wei Liu --- xen/arch/x86/setup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 9bd42a55f94b..141957c9f6a5 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -872,6 +872,9 @@ void __init noreturn __start_xen(unsigned long mbi_p) =20 /* Full exception support from here on in. */ =20 + rdmsrl(MSR_EFER, this_cpu(efer)); + asm volatile ( "mov %%cr4,%0" : "=3Dr" (get_cpu_info()->cr4) ); + /* Enable NMIs. Our loader (e.g. Tboot) may have left them disabled. = */ enable_nmis(); =20 @@ -918,9 +921,6 @@ void __init noreturn __start_xen(unsigned long mbi_p) =20 parse_video_info(); =20 - rdmsrl(MSR_EFER, this_cpu(efer)); - asm volatile ( "mov %%cr4,%0" : "=3Dr" (get_cpu_info()->cr4) ); - /* We initialise the serial devices very early so we can get debugging= . */ ns16550.io_base =3D 0x3f8; ns16550.irq =3D 4; --=20 2.11.0