From nobody Fri Nov 29 18:29:46 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=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1628768979; cv=none; d=zohomail.com; s=zohoarc; b=YRhVaDUGfwCsVXM7i/WBfNU+YK4i5U3aq3A0rdBRNoSyPiZPXDP9M///ys4hdsL/yeC/rqFPV7G7UJA+cnmcAEAoPqmg7/q8flj8hrpgNMlkpnZ3C7qf5cjxTcjRLp1ZCMe01ccQ+fDPky5PMz+nkScNcdrOMFLrEUM2fmVNRJg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628768979; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=iV8nWS44xxsmNUy17PJPDcr7eTt+VAex+weOKkfbZCI=; b=NnMt5AfJZE+Ct0EzQ2Ndfw9VPOV6pFImyy+5f74xD691PoTtCNwotX+jfqAnAO5QbwydCcCAZfjBv8m070Kf2tRWI5S2SiQiOARCjVobPOFZdhE7DpyEeod2BVdvTxEeQQqNYjquaXyOBFXqH5sIANVphfW/ma2cxZQPZM9b7nU= 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 1628768979933597.7198961781141; Thu, 12 Aug 2021 04:49:39 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.166264.303598 (Exim 4.92) (envelope-from ) id 1mE9D0-00067q-Hr; Thu, 12 Aug 2021 11:49:14 +0000 Received: by outflank-mailman (output) from mailman id 166264.303598; Thu, 12 Aug 2021 11:49: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 1mE9D0-00067j-E0; Thu, 12 Aug 2021 11:49:14 +0000 Received: by outflank-mailman (input) for mailman id 166264; Thu, 12 Aug 2021 11:49:13 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mE9Cz-00067d-6l for xen-devel@lists.xenproject.org; Thu, 12 Aug 2021 11:49:13 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e7f33599-53e2-4d6c-9d50-45a9279917f1; Thu, 12 Aug 2021 11:49:12 +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: e7f33599-53e2-4d6c-9d50-45a9279917f1 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1628768951; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=CL3znfpWELLv4litjeLtI8c/M9lffSXcm1hEov0YUxw=; b=PW5I+1Q79QPnu8c5lCFBCNk5RC0B4uXQmSbC93UZxtdOSKCcB4xDHFb3 +C6PviVYz/k7HFcCxmNUv5ch0LtgVCoGqcYptSWeBQnr+rqfiKGvYkavF JLY7Cn/XJUF7jfGRj1RjFLrAqn36gQzdGf//dZGvENLpqgTK25K2q/145 A=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: R27mI2Eir9g7r4EgxXd8icAcU6DDlliLE5l86UHKaeY+w/LCTcNnPaTAgqlMvPZ2pvvg/L+jtX RzzMkb89c4tcFalCDJ03rvJebHGqsO01leWKSsmzcBzoxDbnWeBLPZLnqZBGK3De1eEvgqh6CP UwjVoPRh1wYcV6daVGVsfhjt7CRvLXktlSKGS9mvTaQN+yfz5MZotcQdi8ev0vRGmdn+IP8i5P sFAvU/TrzfgjpEl3CZH3kSCfmVrfeO2rXhaxbrf9fjW0ptpT6P4f4bFqg43Wze7HIE0bSTsDli QnZxwkXEZCeaw0iovqt/kmBS X-SBRS: 5.1 X-MesageID: 50296498 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:LGD9Gq0TjgIuHByJ3XsUyAqjBLwkLtp133Aq2lEZdPRUGvb4qy nIpoV86faUskd3ZJhOo6HiBEDtexzhHP1OkO0s1NWZLWvbUQKTRekIh+aP/9SJIVyGygc378 ddmsZFZuEYdWIK6PrH3A== X-IronPort-AV: E=Sophos;i="5.84,315,1620705600"; d="scan'208";a="50296498" From: Jane Malalane To: Xen-devel CC: Jane Malalane , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [PATCH] x86/pv: Provide more helpful error when CONFIG_PV32 is absent Date: Thu, 12 Aug 2021 12:48:57 +0100 Message-ID: <20210812114857.20971-1-jane.malalane@citrix.com> X-Mailer: git-send-email 2.11.0 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: 1628768981301100001 Currently, when booting a 32bit dom0 kernel, the message isn't very helpful: (XEN) Xen kernel: 64-bit, lsb (XEN) Dom0 kernel: 32-bit, PAE, lsb, paddr 0x100000 -> 0x112000 (XEN) Mismatch between Xen and DOM0 kernel (XEN) (XEN) **************************************** (XEN) Panic on CPU 0: (XEN) Could not construct domain 0 (XEN) **************************************** With this adjustment, it now looks like this: (XEN) Xen kernel: 64-bit, lsb (XEN) Found 32-bit PV kernel, but CONFIG_PV32 missing (XEN) (XEN) **************************************** (XEN) Panic on CPU 0: (XEN) Could not construct domain 0 (XEN) **************************************** Suggested-by: Andrew Cooper Signed-off-by: Jane Malalane Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Andrew Cooper CC: "Roger Pau Monn=C3=A9" CC: Wei Liu --- xen/arch/x86/pv/dom0_build.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c index af47615b22..80e6c6e35b 100644 --- a/xen/arch/x86/pv/dom0_build.c +++ b/xen/arch/x86/pv/dom0_build.c @@ -362,9 +362,9 @@ int __init dom0_construct_pv(struct domain *d, compatible =3D false; machine =3D elf_uval(&elf, elf.ehdr, e_machine); =20 -#ifdef CONFIG_PV32 if ( elf_32bit(&elf) ) { +#ifdef CONFIG_PV32 if ( parms.pae =3D=3D XEN_PAE_BIMODAL ) parms.pae =3D XEN_PAE_EXTCR3; if ( parms.pae && machine =3D=3D EM_386 ) @@ -377,8 +377,12 @@ int __init dom0_construct_pv(struct domain *d, =20 compatible =3D true; } - } +#else + printk("Found 32-bit PV kernel, but CONFIG_PV32 missing\n"); + rc =3D -ENODEV; + goto out; #endif + } =20 compat =3D is_pv_32bit_domain(d); =20 --=20 2.11.0