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

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


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 4 Apr 2023 11:19:08 +0200
  • 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=/7N904AxklSbnMiROFbdWJfhWDMU/a+PNtwY8Ooo9QI=; b=KbUUh1GlFBg2IcBus5lH0FsROpj0cozNVxCc8zXm1upBnO+msKgoiVR1qaf4gvoXE+n5/a7ASNGqWS+SpeuooV0PSJjEWEKAvq04uFXFYXv2wWwc15pV9LfkeJl1WrGXNoKZ6XVZsSJXlbCjoNzgRtPmT2kXNQyalh/nmGqVNokNdBerSpBmlmhtJzpLETCX9rLAvZ9OyI8cPsl5pu84Vzn7t/XyzNA2x453Ava+/H0ZtsNBf1bBl6Mt9OF1ph6nDdzhJu7Cef57c85tTzp6s8z31PurCSLjhjWFIR29kWug6FWQokKj5kwws2LalG+VQQY2aNx5yto9mEjj+S3TZw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dXjcnHJV9t+ebL3yCyqlnnc4xs4LSzhBG1Zpqfj77IpBYLumNKSlxc41/z9rBXwttrZZcZ2/ULA3oaBKVTWHh6045oGFdEBxxC5azCYLbC8MIu+Kp1R41cE7cBQi/c+b1N4Lx6WIQV/D+XvvSqiugJP/qUJmsLkhPlOuKlHYzKAed2spZAcok49NpzowxO6NX62Q5d7o+wZFiE6bp5rcRY+xYL7k6KMf9x8Sch+pU4G4smx5DI5aPJDk6ZVjk1X5Pc0e9e+fyZuc7r9Oq+z+t+8Hz0SG3HPECNpmukyeFK3d5pq/ebxIoDnVRu0zdN6d48dCZfj3WMn3muknoYMzKg==
  • 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: Tue, 04 Apr 2023 09:19:25 +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.

Note that no known users exist that would have developed a dependency on
the bogus magic string. In particular Linux, NetBSD, and mini-os have
been checked.

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 (crash?) 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 engaged, 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 (in not mentioning this VM-
assist aspect).
---
v2: Extend description.

--- 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®.