From: Jan Beulich <jbeulich@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
"Ard Biesheuvel" <ardb@kernel.org>,
linux-efi@vger.kernel.org, norbert.kaminski@3mdeb.com,
xen-devel@lists.xenproject.org,
"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] efi: discover ESRT table on Xen PV too
Date: Wed, 19 Aug 2020 09:20:59 +0200 [thread overview]
Message-ID: <c04fd081-2a13-93bb-fa0b-f9781062fb58@suse.com> (raw)
In-Reply-To: <20200818124710.GK828@Air-de-Roger>
On 18.08.2020 14:47, Roger Pau Monné wrote:
> On Tue, Aug 18, 2020 at 02:01:35PM +0200, Marek Marczykowski-Górecki wrote:
>> On Mon, Aug 17, 2020 at 11:00:13AM +0200, Roger Pau Monné wrote:
>>> On Sun, Aug 16, 2020 at 02:19:49AM +0200, Marek Marczykowski-Górecki wrote:
>>>> In case of Xen PV dom0, Xen passes along info about system tables (see
>>>> arch/x86/xen/efi.c), but not the memory map from EFI.
>>>
>>> I think that's because the memory map returned by
>>> XENMEM_machine_memory_map is in e820 form, and doesn't contain the
>>> required information about the EFI regions due to the translation done
>>> by efi_arch_process_memory_map in Xen?
>>
>> Yes, I think so.
>>
>>>> This makes sense
>>>> as it is Xen responsible for managing physical memory address space.
>>>> In this case, it doesn't make sense to condition using ESRT table on
>>>> availability of EFI memory map, as it isn't Linux kernel responsible for
>>>> it.
>>>
>>> PV dom0 is kind of special in that regard as it can create mappings to
>>> (almost) any MMIO regions, and hence can change it's memory map
>>> substantially.
>>
>> Do you mean PV dom0 should receive full EFI memory map? Jan already
>> objected this as it would be a layering violation.
>
> dom0 is already capable of getting the native e820 memory map using
> XENMEM_machine_memory_map, I'm not sure why allowing to return the
> memory map in EFI form would be any different (or a layering
> violation in the PV dom0 case).
The EFI memory map exposes more information than the E820 one, and
this extra information should remain private to Xen if at all
possible. I actually think that exposing the raw E820 map was a
layering violation, too. Instead hypercalls should have been added
for the specific legitimate uses that Dom0 may have for the memmap.
Jan
prev parent reply other threads:[~2020-08-19 7:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-16 0:19 Marek Marczykowski-Górecki
2020-08-17 8:16 ` Ard Biesheuvel
2020-08-18 11:45 ` Marek Marczykowski-Górecki
2020-08-17 9:00 ` Roger Pau Monné
2020-08-18 12:01 ` Marek Marczykowski-Górecki
2020-08-18 12:47 ` Roger Pau Monné
2020-08-18 15:00 ` Marek Marczykowski-Górecki
2020-08-18 17:21 ` Roger Pau Monné
2020-08-18 18:40 ` Marek Marczykowski-Górecki
2020-08-19 8:19 ` Roger Pau Monné
2020-08-19 11:33 ` Norbert Kaminski
2020-08-20 9:30 ` Roger Pau Monné
2020-08-20 9:34 ` Marek Marczykowski-Górecki
2020-08-20 10:20 ` Roger Pau Monné
2020-08-20 9:35 ` Ard Biesheuvel
2020-08-19 7:20 ` Jan Beulich [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c04fd081-2a13-93bb-fa0b-f9781062fb58@suse.com \
--to=jbeulich@suse.com \
--cc=ardb@kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marmarek@invisiblethingslab.com \
--cc=norbert.kaminski@3mdeb.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®