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

EFI's -mapbs option may cause Linux to panic()


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 21 Nov 2022 17:27:16 +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=gweotCxjxxG9H3WOS31m2tZBG9WvznEGBh8ZcsSAN7k=; b=VAikol9qkYkgZdB3GZVExlymDwGUr8/fCDoZ00UeLrx0GQ6SDksu4w8o4r86kpIiJG7ZCAYYJz/uaNT6sam7jDwCwAgkQc7/2AQYn2zlqu6VIZ/1XFUDut9LfgHhLvUjbNRQ2dyuTUm/1lwYfEkrWWyw7OaLh4wMdev48uvfwKDYHD/XE1PjKmSLgtu0tKtfRqzf26dxbVsOyxFpEc3ex6mSAFuxPJRPrFJi6Har7x96R1hGltuJJdDbERvRIEVIzpIQGDGVO83qTbEnimHuuiRhSvzjkRzjd1t1y+kSh3ic8rxbYdncNEttO/WySoDrUR5IRnAiCp+yVZ1b2wOkvw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B0fNpVRGZjrzI4uaz2a4r27xN9Z3GFe5+eBcsOl7cvgs6hGTDCS9S6sQ+O5GwCbqDnpAexs0+Hf5h62NFPtOqBBQswtHeHtrSV8dlU1jJ/OQO4EI+FSGdyC/9sCRXe+6IvjrDIT2Kdhs1zsvewjcgMr+Ypg+z60ZZjRUt8AOKQo7C0zclDDLtLEJoZQaHWXo+oeaIkJZFbUkOLhlpuMd5bxTA5dW8XHEAR4b21IKlqnAtbHjeIGDm0AzlkNDM/KUXfO76IyNQnV16AvaWk8pCm3e3Ev6qDPVz5Syeu7W9uHq24xa7eAJSXYrm7MHuk010TcsEfXWJnFz5EiMiUQqQQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Mon, 21 Nov 2022 16:27:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hello,

on a system with these first two EFI memory map entries

(XEN)  0000000000000-000000009dfff type=4 attr=000000000000000f
(XEN)  000000009e000-000000009ffff type=2 attr=000000000000000f

i.e. except for 2 pages all space below 1M being BootServicesData, the
-mapbs option has the effect of marking reserved all that space. Then
Linux fails trying to allocate its lowmem trampoline (which really it
shouldn't need when running in PV mode), ultimately leading to

                panic("Real mode trampoline was not allocated");

in their init_real_mode().

While for PV I think it is clear that the easiest is to avoid
trampoline setup in the first place, iirc PVH Dom0 also tries to
mirror the host memory map to its own address space. Does PVH Linux
require a lowmem trampoline?

While the two pages here are just enough for Xen's trampoline, I still
wonder whether we want to adjust -mapbs behavior. Since whatever we
might do leaves a risk of conflicting with true firmware (mis)use of
that space, the best I can think of right now would be another option
altering behavior (or providing altered behavior). Yet such an option
would likely need to be more fine-grained then than covering all of
the low Mb in one go. Which feels like both going too far and making
it awkward for people to figure out what value(s) to use ...

Thoughts anyone?

Thanks, Jan



 


Rackspace

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