From nobody Sun May 19 02:26:42 2024 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=quarantine dis=none) header.from=antgroup.com ARC-Seal: i=1; a=rsa-sha256; t=1713873703; cv=none; d=zohomail.com; s=zohoarc; b=kEnnhTT0XJ0U15fdCWSXDeH/lxqM4bWdYCIEgj4tHb/gYJdXv9x6Cq16xc/ATtxQfwNMhdXy3scAthwZ13VJJ/xuJtmo0XuVASqtPwMG8wy71/HIFLQc7KDgMuJTc8rmLAIATbaaQWr4svlZIKtV9NIhiAWiX+AnSt44bMvrzRs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1713873703; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=fZ3yJhfmevqTNF6DwN5orHbyXoVhDRkMA3HeGG/5QSU=; b=hN5xI7mpiEtYJS3enoAMSJiyWNnbDlASRJ76CN3KoYGUYChyALHDPtNZ6OX9CbEbISwXJxTgo07hCU4LL9Vy85CwKe1euwiNys7U9OGZZc0Uzp+jSDyVxn2hp0ym8cJI1eVb2tENps2sDarBG5AcUrR+Exv/Jpn1+z/7F7VOYK0= 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=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1713873702686659.9716206195253; Tue, 23 Apr 2024 05:01:42 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.710551.1109787 (Exim 4.92) (envelope-from ) id 1rzEpm-0005ki-4h; Tue, 23 Apr 2024 12:01:14 +0000 Received: by outflank-mailman (output) from mailman id 710551.1109787; Tue, 23 Apr 2024 12:01:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rzEpm-0005kb-2B; Tue, 23 Apr 2024 12:01:14 +0000 Received: by outflank-mailman (input) for mailman id 710551; Tue, 23 Apr 2024 12:01:12 +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 1rzEpj-0005kV-TD for xen-devel@lists.xenproject.org; Tue, 23 Apr 2024 12:01:12 +0000 Received: from out0-217.mail.aliyun.com (out0-217.mail.aliyun.com [140.205.0.217]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 299b52be-0169-11ef-909a-e314d9c70b13; Tue, 23 Apr 2024 14:01:08 +0200 (CEST) Received: from localhost(mailfrom:houwenlong.hwl@antgroup.com fp:SMTPD_---.XJWBgvy_1713873662) by smtp.aliyun-inc.com; Tue, 23 Apr 2024 20:01:03 +0800 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: 299b52be-0169-11ef-909a-e314d9c70b13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1713873664; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=fZ3yJhfmevqTNF6DwN5orHbyXoVhDRkMA3HeGG/5QSU=; b=ObkvEPuhWgrfYLfD1cdS/CSc+PIZXHcqGF8n9vh+BtItKn8PJWZKBhlPgl6i/KRKiMpZz+UjJpdT/gjtV8FZ3LBzHJzRJordXD4TaAMITnUUb1ddPhh+fCSx1dRlU/TRNvcVaEc4hJQ70wLQCcFOH66be+JVGQyxXvvf0c0QIgs= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R721e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047201;MF=houwenlong.hwl@antgroup.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---.XJWBgvy_1713873662; From: "Hou Wenlong" To: linux-kernel@vger.kernel.org Cc: "Hou Wenlong" , "Juergen Gross" , "Boris Ostrovsky" , "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , "Dave Hansen" , , "H. Peter Anvin" , Subject: [PATCH v2] x86/xen/pvh: Enable PAE mode for 32-bit guest only when CONFIG_X86_PAE is set Date: Tue, 23 Apr 2024 20:00:58 +0800 Message-Id: <0469c27833be58aa66471920aa77922489d86c63.1713873613.git.houwenlong.hwl@antgroup.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @antgroup.com) X-ZM-MESSAGEID: 1713873705725100001 Content-Type: text/plain; charset="utf-8" The PVH entry is available for 32-bit KVM guests, and 32-bit KVM guests do not depend on CONFIG_X86_PAE. However, mk_early_pgtbl_32() builds different pagetables depending on whether CONFIG_X86_PAE is set. Therefore, enabling PAE mode for 32-bit KVM guests without CONFIG_X86_PAE being set would result in a boot failure during CR3 loading. Signed-off-by: Hou Wenlong Reviewed-by: Juergen Gross --- v1 -> v2: Add the "Reviewed-by" tag from Juergen v1: https://lore.kernel.org/lkml/8c5448eeebbba998a7fff9ed9b2f7e7f3e437967.1= 697792461.git.houwenlong.hwl@antgroup.com --- arch/x86/platform/pvh/head.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/platform/pvh/head.S b/arch/x86/platform/pvh/head.S index f7235ef87bc3..18c69d213458 100644 --- a/arch/x86/platform/pvh/head.S +++ b/arch/x86/platform/pvh/head.S @@ -71,10 +71,12 @@ SYM_CODE_START_LOCAL(pvh_start_xen) =20 mov $_pa(early_stack_end), %esp =20 +#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) /* Enable PAE mode. */ mov %cr4, %eax orl $X86_CR4_PAE, %eax mov %eax, %cr4 +#endif =20 #ifdef CONFIG_X86_64 /* Enable Long mode. */ --=20 2.31.1