xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <royger@freebsd.org>
To: Julien Grall <julien@xen.org>
Cc: Elliott Mitchell <ehem+undef@m5p.com>,
	xen-devel@lists.xenproject.org,
	Mitchell Horne <mhorne@freebsd.org>
Subject: Re: Uses of /hypervisor memory range (was: FreeBSD/Xen/ARM issues)
Date: Fri, 14 May 2021 12:07:53 +0200	[thread overview]
Message-ID: <YJ5L+ar29Q8g+xm+@Air-de-Roger> (raw)
In-Reply-To: <93936406-574f-7fd0-53bf-3bafaa4b1947@xen.org>

On Fri, May 14, 2021 at 09:32:10AM +0100, Julien Grall wrote:
> Hi Elliott,
> 
> On 14/05/2021 03:42, Elliott Mitchell wrote:
> > Was it intended for the /hypervisor range to dynamically scale with the
> > size of the domain?
> As per above, this doesn't depend on the size of the domain. Instead, this
> depends on what sort of the backend will be present in the domain.

It should instead scale based on the total memory on the system, ie:
if your hardware has 4GB of RAM the unpopulated range should at least
be: 4GB - memory of the current domain, so that it could map any
possible page assigned to a different domain (and even then I'm not
sure we shouldn't account for duplicated mappings).

> > Might it be better to deprecate the /hypervisor range and have domains
> > allocate any available address space for foreign mappings?
> 
> It may be easy for FreeBSD to find available address space but so far this
> has not been the case in Linux (I haven't checked the latest version
> though).
> 
> To be clear, an OS is free to not use the range provided in /hypervisor
> (maybe this is not clear enough in the spec?). This was mostly introduced to
> overcome some issues we saw in Linux when Xen on Arm was introduced.
> 
> > 
> > Should the FreeBSD implementation be treating grant tables as distinct
> > from other foreign mappings?
> 
> Both require unallocated addres space to work. IIRC FreeBSD is able to find
> unallocated space easily, so I would recommend to use it.

I agree. I think the main issue here is that there seems to be some
bug (or behavior not understood properly) with the resource manager
on Arm that returns an error when requesting a region anywhere in the
memory address space, ie: [0, ~0].

> > (is treating them the same likely to
> > induce buggy behavior on x86?)
> 
> I will leave this answer to Roger.

x86 is already treating them the same by using xenmem_alloc to request
memory to map the grant table or foreign mappings, so there's no
change on x86 in that regard.

Maybe I'm not getting that last question right.

Roger.


  reply	other threads:[~2021-05-14 10:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <YIhSbkfShjN/gMCe@Air-de-Roger>
     [not found] ` <YIndyh0sRqcmcMim@mattapan.m5p.com>
     [not found]   ` <YIptpndhk6MOJFod@Air-de-Roger>
     [not found]     ` <YItwHirnih6iUtRS@mattapan.m5p.com>
     [not found]       ` <YIu80FNQHKS3+jVN@Air-de-Roger>
     [not found]         ` <YJDcDjjgCsQUdsZ7@mattapan.m5p.com>
     [not found]           ` <YJURGaqAVBSYnMRf@Air-de-Roger>
     [not found]             ` <YJYem5CW/97k/e5A@mattapan.m5p.com>
     [not found]               ` <YJs/YAgB8molh7e5@mattapan.m5p.com>
     [not found]                 ` <54427968-9b13-36e6-0001-27fb49f85635@xen.org>
2021-05-14  2:42                   ` Elliott Mitchell
2021-05-14  8:32                     ` Julien Grall
2021-05-14 10:07                       ` Roger Pau Monné [this message]
2021-05-15  1:18                       ` Elliott Mitchell
2021-05-15 10:08                         ` Julien Grall
2021-05-19 23:25                           ` Stefano Stabellini
2021-05-20  9:51                             ` Julien Grall
2021-05-20 16:21                               ` Stefano Stabellini
2021-06-18 12:19                                 ` Oleksandr Andrushchenko
2021-07-03 17:17                                   ` Julien Grall
2021-07-22 20:41                                     ` Oleksandr Tyshchenko

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=YJ5L+ar29Q8g+xm+@Air-de-Roger \
    --to=royger@freebsd.org \
    --cc=ehem+undef@m5p.com \
    --cc=julien@xen.org \
    --cc=mhorne@freebsd.org \
    --cc=xen-devel@lists.xenproject.org \
    --subject='Re: Uses of /hypervisor memory range (was: FreeBSD/Xen/ARM issues)' \
    /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

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).