xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien@xen.org>
To: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@epam.com>,
	Julien Grall <julien.grall.oss@gmail.com>,
	Stefano Stabellini <sstabellini@kernel.org>
Cc: Anastasiia Lukianenko <Anastasiia_Lukianenko@epam.com>,
	Juergen Gross <jgross@suse.com>, Peng Fan <peng.fan@nxp.com>,
	Roman Shaposhnik <roman@zededa.com>,
	Bertrand Marquis <Bertrand.Marquis@arm.com>,
	Nataliya Korovkina <malus.brandywine@gmail.com>,
	Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: UEFI support in ARM DomUs
Date: Fri, 19 Jun 2020 14:15:57 +0100	[thread overview]
Message-ID: <b3e805ef-fb0d-308c-57fb-e7b78f82a786@xen.org> (raw)
In-Reply-To: <424cfbdc-0744-fcf7-5bb4-52aca2357df7@epam.com>



On 19/06/2020 14:06, Oleksandr Andrushchenko wrote:
> 
> On 6/19/20 3:59 PM, Julien Grall wrote:
>> Hi,
>>
>> On 19/06/2020 13:51, Oleksandr Andrushchenko wrote:
>>> On 6/19/20 3:47 PM, Julien Grall wrote:
>>>> They will not be available from the fdt, but you can retrieve them with an hypervisor call (see HVM_PARAM_STORE_PFN, HVM_PARAM_CONSOLE_PFN).
>>> Yes, and it used in the relevant pieces of code (hyp calls)
>>>> One question though, why do you need to map them in advance? Couldn't you map them on demand?
>>>
>>> Well, we need to at least estimate the pg_table size so we can reserve and allocate memory later,
>>
>> Oh, so U-boot doesn't support runtime page-table table allocation. Is that right?
> As per my understanding no, we provide a memory map and the tables are allocated beforehand

Ok :(.

>>
>>>
>>> so I have to provide memory range from either by coding a constant or looking into the devtree at
>>>
>>> hypervisor { reg = <>; }. It is a bit tricky though
>>
>> Looking for a node in the device-tree shouldn't be too difficult given that you have fdt_* available.
>>
>> However, please not that <reg> doesn't refer to the guest magic pages. Instead, it provides a region you can use for mapping the grant-table frames
> 
> Indeed, this is in my case 0x38000000, but the magic is at 0x39000000
> 
> So, I need the memory range set up beforehand, but I can't as there is no cute way to get that.
> 
> Of course, I can issue a hyp call to get HVM_PARAM_CONSOLE_PFN and use it as the base address,
> 
> but this smells like a hack. I can call other HVM_PARAM_ to get their pfns and set up the memory regions,
> 
> but this looks a bit weird.

Why is it weird? In general, you only want to map exactly what you need. 
Not less, not more.

In your situation, you only care about two pages, the console page and 
the xenstore page. The rest shouldn't be mapped.

> I need that constant badly ;)

No you don't ;).

Cheers,

-- 
Julien Grall


  reply	other threads:[~2020-06-19 13:16 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-31 22:05 UEFI support in ARM DomUs Roman Shaposhnik
2020-05-31 22:24 ` Julien Grall
2020-06-01  4:11   ` Roman Shaposhnik
2020-06-01 16:12     ` Stefano Stabellini
2020-06-02 22:50       ` Roman Shaposhnik
2020-06-04 16:58         ` George Dunlap
2020-06-03 10:16     ` Julien Grall
2020-06-04  1:57 ` Peng Fan
2020-06-04 15:26   ` Oleksandr Andrushchenko
2020-06-04 15:31     ` Stefano Stabellini
2020-06-04 16:50       ` Roman Shaposhnik
2020-06-15  1:58       ` Peng Fan
2020-06-18  5:22       ` Oleksandr Andrushchenko
2020-06-18 14:50         ` Julien Grall
2020-06-18 22:00           ` Stefano Stabellini
2020-06-18 22:49             ` Julien Grall
2020-06-19 12:32               ` Oleksandr Andrushchenko
2020-06-19 12:47                 ` Julien Grall
2020-06-19 12:51                   ` Oleksandr Andrushchenko
2020-06-19 12:59                     ` Julien Grall
2020-06-19 13:06                       ` Oleksandr Andrushchenko
2020-06-19 13:15                         ` Julien Grall [this message]
2020-06-19 13:29                           ` Oleksandr Andrushchenko
2020-06-22 13:56                             ` Oleksandr Andrushchenko
2020-06-22 14:23                               ` Julien Grall
2020-06-19 13:16                         ` Peng Fan
2020-06-19 13:31                           ` Oleksandr Andrushchenko
2020-06-19 20:02               ` Stefano Stabellini
2020-06-22 14:04                 ` Oleksandr Andrushchenko
2020-06-22 14:27                   ` Julien Grall
2020-06-22 14:33                     ` Oleksandr Andrushchenko
2020-06-22 17:49                       ` Julien Grall
2020-06-23  1:20                         ` Stefano Stabellini
2020-06-23  5:31                           ` Oleksandr Andrushchenko
2020-06-24  6:14                             ` Oleksandr Andrushchenko
2020-06-24  7:07                               ` Peng Fan
2020-06-24  7:17                                 ` Oleksandr Andrushchenko
2020-06-24  7:26                                   ` Peng Fan
2020-06-24  7:38                                     ` Oleksandr Andrushchenko
2020-06-24 17:05                               ` Stefano Stabellini
2020-06-24 19:31                                 ` Oleksandr Andrushchenko
2020-06-24 19:47                                   ` Stefano Stabellini
2020-06-19  7:04           ` Oleksandr Andrushchenko
2020-06-04 15:38     ` Julien Grall
2020-06-04 16:27       ` Stefano Stabellini
2020-06-04 16:34         ` Julien Grall

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=b3e805ef-fb0d-308c-57fb-e7b78f82a786@xen.org \
    --to=julien@xen.org \
    --cc=Anastasiia_Lukianenko@epam.com \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Oleksandr_Andrushchenko@epam.com \
    --cc=jgross@suse.com \
    --cc=julien.grall.oss@gmail.com \
    --cc=malus.brandywine@gmail.com \
    --cc=peng.fan@nxp.com \
    --cc=roman@zededa.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).