All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Fam Zheng <fam@euphon.net>
Cc: Julien Grall <julien@xen.org>,
	Bertrand.Marquis@arm.com, Kaly.Xin@arm.com, Wei.Chen@arm.com,
	nd@arm.com, Paul Durrant <paul@xen.org>,
	Penny Zheng <penny.zheng@arm.com>,
	xen-devel@lists.xenproject.org, sstabellini@kernel.org
Subject: Re: [RFC] design: design doc for 1:1 direct-map
Date: Tue, 8 Dec 2020 11:53:40 +0100	[thread overview]
Message-ID: <2c7e96e1-9a34-4a9d-2a8f-7479d46f1a92@suse.com> (raw)
In-Reply-To: <20201208102205.GA118611@dev>

On 08.12.2020 11:22, Fam Zheng wrote:
> On 2020-12-08 10:12, Jan Beulich wrote:
>> On 08.12.2020 10:07, Julien Grall wrote:
>>> On 08/12/2020 05:21, Penny Zheng wrote:
>>>> --- /dev/null
>>>> +++ b/docs/designs/1_1_direct-map.md
>>>> @@ -0,0 +1,87 @@
>>>> +# Preface
>>>> +
>>>> +The document is an early draft for direct-map memory map
>>>> +(`guest physical == physical`) of domUs. And right now, it constrains to ARM
>>>
>>> s/constrains/limited/
>>>
>>> Aside the interface to the user, you should be able to re-use the same 
>>> code on x86. Note that because the memory layout on x86 is fixed (always 
>>> starting at 0), you would only be able to have only one direct-mapped 
>>> domain.
>>
>> Even one seems challenging, if it's truly meant to have all of the
>> domain's memory direct-mapped: The use of space in the first Mb is
>> different between host and guest.
> 
> Speaking about the case of x86, we can still direct-map the ram regions
> to the single direct-mapped DomU because neither Xen nor dom0 require
> those low mem.
> 
> We don't worry about (i.e. don't direct-map) non-ram regions (or any
> range that is not reported as usable ram from DomU's PoV (dictated by
> e820 table), so those can be MMIO or arbitrary mapping with EPT.

For one, the very first page is considered special in x86 Xen. No
guest should gain access to MFN 0, unless you first audit all
code and address all the issues you find. And then there's also
Xen's low-memory trampoline living there. Plus besides the BDA
(at real-mode address 0040:0000) I suppose the EBDA also shouldn't
be exposed to a guest, nor anything else that the host finds
reserved in E820. IOW it would be the host E820 to dictate some
of the guest E820 in such a case.

Jan


  reply	other threads:[~2020-12-08 10:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08  5:21 [RFC] design: design doc for 1:1 direct-map Penny Zheng
2020-12-08  9:07 ` Julien Grall
2020-12-08  9:12   ` Jan Beulich
2020-12-08 10:22     ` Fam Zheng
2020-12-08 10:53       ` Jan Beulich [this message]
2020-12-08 11:23         ` Fam Zheng
2020-12-10  7:02   ` Penny Zheng
2021-01-05 12:41     ` Julien Grall
2020-12-08 10:29 ` Fam Zheng
2021-01-06 11:51 Penny Zheng

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=2c7e96e1-9a34-4a9d-2a8f-7479d46f1a92@suse.com \
    --to=jbeulich@suse.com \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Kaly.Xin@arm.com \
    --cc=Wei.Chen@arm.com \
    --cc=fam@euphon.net \
    --cc=julien@xen.org \
    --cc=nd@arm.com \
    --cc=paul@xen.org \
    --cc=penny.zheng@arm.com \
    --cc=sstabellini@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.