From: "Roger Pau Monné" <roger.pau@citrix.com>
To: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
Cc: Norbert Kaminski <norbert.kaminski@3mdeb.com>,
Ard Biesheuvel <ardb@kernel.org>, <linux-efi@vger.kernel.org>,
<xen-devel@lists.xenproject.org>,
open list <linux-kernel@vger.kernel.org>,
Maciej Pijanowski <maciej.pijanowski@3mdeb.com>,
<piotr.krol@3mdeb.com>
Subject: Re: [PATCH] efi: discover ESRT table on Xen PV too
Date: Thu, 20 Aug 2020 12:20:16 +0200 [thread overview]
Message-ID: <20200820102016.GU828@Air-de-Roger> (raw)
In-Reply-To: <20200820093454.GS1626@mail-itl>
On Thu, Aug 20, 2020 at 11:34:54AM +0200, Marek Marczykowski-Górecki wrote:
> On Thu, Aug 20, 2020 at 11:30:25AM +0200, Roger Pau Monné wrote:
> > Right, so you only need access to the ESRT table, that's all. Then I
> > think we need to make sure Xen doesn't use this memory for anything
> > else, which will require some changes in Xen (or at least some
> > checks?).
> >
> > We also need to decide what to do if the table turns out to be placed
> > in a wrong region. How are we going to prevent dom0 from using it
> > then? My preference would be to completely hide it from dom0 in that
> > case, such that it believes there's no ESRT at all if possible.
>
> Yes, that makes sense. As discussed earlier, that probably means
> re-constructing SystemTable before giving it to dom0. We'd need to do
> that in PVH case anyway, to adjust addresses, right?
Not really, on PVH dom0 we should be able to identity map the required
EFI regions in the dom0 p2m, so the only difference between a classic
PV dom0 is that we need to assure that those regions are correctly
identity mapped in the p2m, but that shouldn't require any change to
the SystemTable unless we need to craft custom tables (see below).
> Is there something
> like this in the Xen codebase already, or it needs to be written from
> scratch?
AFAICT it needs to be written for EFI. For the purposes here I think
you could copy the SystemTable and modify the NumberOfTableEntries and
ConfigurationTable fields in the copy in order to delete the ESRT if
found to be placed in a non suitable region?
At that point we can remove the checks from Linux since Xen will
assert that whatever gets passed to dom0 is in a suitable region. It
would be nice to have a way to signal that the placement of the ESRT
has been checked, but I'm not sure how to do this, do you have any
ideas?
Roger.
next prev parent reply other threads:[~2020-08-20 10:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-16 0:19 [PATCH] efi: discover ESRT table on Xen PV too 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é [this message]
2020-08-20 9:35 ` Ard Biesheuvel
2020-08-19 7:20 ` Jan Beulich
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=20200820102016.GU828@Air-de-Roger \
--to=roger.pau@citrix.com \
--cc=ardb@kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.pijanowski@3mdeb.com \
--cc=marmarek@invisiblethingslab.com \
--cc=norbert.kaminski@3mdeb.com \
--cc=piotr.krol@3mdeb.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