[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] x86/PV: ignore PAE_MODE ELF note for 64-bit Dom0


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 15 Feb 2023 16:10:32 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=T6by/01wQhc29qxO37JY8k+FM1lQfm499S2Toxg3O0o=; b=ey3Dv09UOpYEswUTzuVTGWc5WKRv1MM342mFekVOqN+6S0SU2kqBnYgLi3HzpL7ghISHmwp1zp5giUsrCRCOlFnTHBmQjw2LPFSRqJN8f7kZ+jri7bz+19g0PLyrsvdbxouUbRtAGa5a0L84w8jC7oFsfZYI9U4EWX9hvrRvFIjaTpySGl5RL5+UpM8QHDWwerCxH+fT8tu2vfVFwFt+sI7cUhPeEECLLQvR4aERLq/yXE0h2fYbNqHn/ZOz4JhQrOajOAd7LVZJDWmp+ZLqJfQRvwBfFWKWJobTQFLR5464OZiSkBkv2w3HN3055dO9vtrfSQwJupw4kr1KEzUrRw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HN9ImcLX8EccO0/mhj/fF3yySVnmRxNcfoAEpyw42OYtmRtk58r6Duc3U5LYAOPMzKIPiwHp/mctP52UEYZwbRT9QFX/xAoP73cXZnzUpMPBHRapz77VkB+2qVJvKN3Jf92+1j+ytqcWgpNCURmh73Sxz/uAbSFf2C+XCrPOb2W4tR1QXMAIiLu8yFdUWw6vUmkPJQBGkUv6ZWjNYh2MZckbsxeQPIAvUUFl5oMc1XAH9OFj4I5QH8F3WR18NEww0Ei3c/YtBlH0Ba4Xml+B+7G7X2BfByfBtR+C4l8z0/iEErfCmv6iFW8Mmwx1ueTIRu5Lur6vQUiOveNejBxwZQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 15 Feb 2023 15:10:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Besides a printk() the main effect is slight corruption of the start
info magic: While that's meant to be xen-3.0-x86_64, it wrongly ended
up as xen-3.0-x86_64p.

Fixes: 460060f83d41 ("libelf: use for x86 dom0 builder")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
RFC: While Linux works fine with the adjustment, I'm not entirely
     certain of external tools (kexec?) having grown a dependency. It
     may be worth noting that XenoLinux and its forward ports never had
     this ELF note in 64-bit kernels, so in principle it may be
     reasonable to expect that no such dependency exists anywhere.

Prior to "x86/PV32: restore PAE-extended-CR3 logic" that (meaningless
for 64-bit domains) VM-assist could also be enabled, based on the ELF
note's value. I expect that change to go in first, at which point the
description here is going to be correct.

--- a/xen/arch/x86/pv/dom0_build.c
+++ b/xen/arch/x86/pv/dom0_build.c
@@ -459,8 +459,13 @@ int __init dom0_construct_pv(struct doma
     compat = is_pv_32bit_domain(d);
 
     if ( elf_64bit(&elf) && machine == EM_X86_64 )
+    {
         compatible = true;
 
+        /* Zap meaningless setting which kernels may carry by mistake. */
+        parms.pae = 0;
+    }
+
     if ( elf_msb(&elf) )
         compatible = false;
 



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.