All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@gmail.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Julien Grall <julien.grall@arm.com>, nd <nd@arm.com>,
	Stefano Stabellini <stefanos@xilinx.com>
Subject: Re: [PATCH 5/6] xen/arm: map reserved-memory regions as normal memory in dom0
Date: Tue, 23 Apr 2019 19:37:05 +0100	[thread overview]
Message-ID: <CAF3u54CD7O0swVyTwMshxUhxnLg56=iF9S1xb5vKjuZq-F9BKQ@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1904231028540.24598@sstabellini-ThinkPad-X260>


[-- Attachment #1.1: Type: text/plain, Size: 2492 bytes --]

Hi,

Sorry for the formatting.

On Tue, 23 Apr 2019, 18:34 Stefano Stabellini, <sstabellini@kernel.org>
wrote:

> On Tue, 23 Apr 2019, Julien Grall wrote:
> > Hi Stefano,
> >
> > On 4/22/19 11:42 PM, Stefano Stabellini wrote:
> > > On Tue, 26 Feb 2019, Julien Grall wrote:
> > > I am not sure about the suggestion of re-using the libfdt concept of
> > > "mem_rsv", which is meant to be for the old /memreserve/. Today, libfdt
> > > (at least our version of it) is not able to parse the new
> > > reserved-memory bindings. I don't think it is a good idea to modify
> > > libfdt for that. Also, the way we want to handle the old memreserve
> > > regions is quite different from the way we want to handle
> > > reserved-memory, right? I cannot see a way to improve this code using
> > > mem_rsv at the moment.
> >
> > I didn't mean to extend mem_rsv in libfdt but extend consider_modules and
> > dt_unreserved_regions to deal with /reserved-memory. Otherwise you
> > may miss some cases (for instance you left out discard_initial_modules).
> >
> > By extending those two functions you don't have to teach everyone how to
> skip
> > /reserved-memory.
>
> I think I get your point now. Although I don't think it should be
> correct for a bootloader to use a reserved-memory area to store a boot
> module, I wouldn't be suprised if that happens, so it is better to be
> prepared and extend dt_unreserved_regions. I'll do that.
>

Why wouldn't this be correct? It is nothing different /mem-reserve.


> However, we would still need something like check_reserved_memory,
> because we don't want setup_xenheap_mappings to be called on the
> reserved-memory area (or a memory region including the reserved memory
> area) in setup_mm. I don't think we can get away without it, but I can
> simplify it.
>

Hmmm, setup_xenheap_mappings is only doing the mapping in page-tables
allowing direct access in Xen. Are you worried of the memory attributes to
be different in Xen?

This would makes sense however setup_xenheap_mappings may still map the
reserved-memory because it is using 1G mapping... This is pretty wrong and
I have patches that should help to fix it.

 Also if you are concerned with /reserved-memory, then it should also be
fixed for /mem-reserve as they are not different. However, this may break
free_initmem as because we try to give back page to xenheap even if they
are reserved.

 The memory management is quite a mess today. I hope to make it better with
my upcoming series.

Cheers,

[-- Attachment #1.2: Type: text/html, Size: 3520 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

WARNING: multiple messages have this Message-ID (diff)
From: Julien Grall <julien.grall@gmail.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Julien Grall <julien.grall@arm.com>, nd <nd@arm.com>,
	Stefano Stabellini <stefanos@xilinx.com>
Subject: Re: [Xen-devel] [PATCH 5/6] xen/arm: map reserved-memory regions as normal memory in dom0
Date: Tue, 23 Apr 2019 19:37:05 +0100	[thread overview]
Message-ID: <CAF3u54CD7O0swVyTwMshxUhxnLg56=iF9S1xb5vKjuZq-F9BKQ@mail.gmail.com> (raw)
Message-ID: <20190423183705.8SjKVBU3dT7PTy5pSizqWb15ub-xVAS33L9dcsz1mtY@z> (raw)
In-Reply-To: <alpine.DEB.2.10.1904231028540.24598@sstabellini-ThinkPad-X260>


[-- Attachment #1.1: Type: text/plain, Size: 2492 bytes --]

Hi,

Sorry for the formatting.

On Tue, 23 Apr 2019, 18:34 Stefano Stabellini, <sstabellini@kernel.org>
wrote:

> On Tue, 23 Apr 2019, Julien Grall wrote:
> > Hi Stefano,
> >
> > On 4/22/19 11:42 PM, Stefano Stabellini wrote:
> > > On Tue, 26 Feb 2019, Julien Grall wrote:
> > > I am not sure about the suggestion of re-using the libfdt concept of
> > > "mem_rsv", which is meant to be for the old /memreserve/. Today, libfdt
> > > (at least our version of it) is not able to parse the new
> > > reserved-memory bindings. I don't think it is a good idea to modify
> > > libfdt for that. Also, the way we want to handle the old memreserve
> > > regions is quite different from the way we want to handle
> > > reserved-memory, right? I cannot see a way to improve this code using
> > > mem_rsv at the moment.
> >
> > I didn't mean to extend mem_rsv in libfdt but extend consider_modules and
> > dt_unreserved_regions to deal with /reserved-memory. Otherwise you
> > may miss some cases (for instance you left out discard_initial_modules).
> >
> > By extending those two functions you don't have to teach everyone how to
> skip
> > /reserved-memory.
>
> I think I get your point now. Although I don't think it should be
> correct for a bootloader to use a reserved-memory area to store a boot
> module, I wouldn't be suprised if that happens, so it is better to be
> prepared and extend dt_unreserved_regions. I'll do that.
>

Why wouldn't this be correct? It is nothing different /mem-reserve.


> However, we would still need something like check_reserved_memory,
> because we don't want setup_xenheap_mappings to be called on the
> reserved-memory area (or a memory region including the reserved memory
> area) in setup_mm. I don't think we can get away without it, but I can
> simplify it.
>

Hmmm, setup_xenheap_mappings is only doing the mapping in page-tables
allowing direct access in Xen. Are you worried of the memory attributes to
be different in Xen?

This would makes sense however setup_xenheap_mappings may still map the
reserved-memory because it is using 1G mapping... This is pretty wrong and
I have patches that should help to fix it.

 Also if you are concerned with /reserved-memory, then it should also be
fixed for /mem-reserve as they are not different. However, this may break
free_initmem as because we try to give back page to xenheap even if they
are reserved.

 The memory management is quite a mess today. I hope to make it better with
my upcoming series.

Cheers,

[-- Attachment #1.2: Type: text/html, Size: 3520 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-04-23 18:37 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-26 23:06 [PATCH 0/6] iomem cacheability Stefano Stabellini
2019-02-26 23:07 ` [PATCH 1/6] xen: extend XEN_DOMCTL_memory_mapping to handle cacheability Stefano Stabellini
2019-02-26 23:18   ` Julien Grall
2019-04-20  0:02     ` Stefano Stabellini
2019-04-20  0:02       ` [Xen-devel] " Stefano Stabellini
2019-04-21 17:32       ` Julien Grall
2019-04-21 17:32         ` [Xen-devel] " Julien Grall
2019-04-22 21:59         ` Stefano Stabellini
2019-04-22 21:59           ` [Xen-devel] " Stefano Stabellini
2019-04-24 10:42           ` Julien Grall
2019-04-24 10:42             ` [Xen-devel] " Julien Grall
2019-02-27 10:34   ` Jan Beulich
2019-04-17 21:12     ` Stefano Stabellini
2019-04-17 21:12       ` [Xen-devel] " Stefano Stabellini
2019-04-17 21:25       ` Julien Grall
2019-04-17 21:25         ` [Xen-devel] " Julien Grall
2019-04-17 21:55         ` Stefano Stabellini
2019-04-17 21:55           ` [Xen-devel] " Stefano Stabellini
2019-04-25 10:41       ` Jan Beulich
2019-04-25 10:41         ` [Xen-devel] " Jan Beulich
2019-04-25 22:31         ` Stefano Stabellini
2019-04-25 22:31           ` [Xen-devel] " Stefano Stabellini
2019-04-26  7:12           ` Jan Beulich
2019-04-26  7:12             ` [Xen-devel] " Jan Beulich
2019-02-27 19:28   ` Julien Grall
2019-04-19 23:20     ` Stefano Stabellini
2019-04-19 23:20       ` [Xen-devel] " Stefano Stabellini
2019-04-21 17:14       ` Julien Grall
2019-04-21 17:14         ` [Xen-devel] " Julien Grall
2019-04-22 17:33         ` Stefano Stabellini
2019-04-22 17:33           ` [Xen-devel] " Stefano Stabellini
2019-04-22 17:42           ` Julien Grall
2019-04-22 17:42             ` [Xen-devel] " Julien Grall
2019-02-27 21:02   ` Julien Grall
2019-02-26 23:07 ` [PATCH 2/6] libxc: xc_domain_memory_mapping, " Stefano Stabellini
2019-02-26 23:07 ` [PATCH 3/6] libxl/xl: add cacheability option to iomem Stefano Stabellini
2019-02-27 20:02   ` Julien Grall
2019-04-19 23:13     ` Stefano Stabellini
2019-04-19 23:13       ` [Xen-devel] " Stefano Stabellini
2019-02-26 23:07 ` [PATCH 4/6] xen/arm: keep track of reserved-memory regions Stefano Stabellini
2019-02-28 14:38   ` Julien Grall
2019-02-26 23:07 ` [PATCH 5/6] xen/arm: map reserved-memory regions as normal memory in dom0 Stefano Stabellini
2019-02-26 23:45   ` Julien Grall
2019-04-22 22:42     ` Stefano Stabellini
2019-04-22 22:42       ` [Xen-devel] " Stefano Stabellini
2019-04-23  8:09       ` Julien Grall
2019-04-23  8:09         ` [Xen-devel] " Julien Grall
2019-04-23 17:32         ` Stefano Stabellini
2019-04-23 17:32           ` [Xen-devel] " Stefano Stabellini
2019-04-23 18:37           ` Julien Grall [this message]
2019-04-23 18:37             ` Julien Grall
2019-04-23 21:34             ` Stefano Stabellini
2019-04-23 21:34               ` [Xen-devel] " Stefano Stabellini
2019-02-26 23:07 ` [PATCH 6/6] xen/docs: how to map a page between dom0 and domU using iomem Stefano Stabellini
2019-03-03 17:20 ` [PATCH 0/6] iomem cacheability Amit Tomer
2019-03-05 21:22   ` Stefano Stabellini
2019-03-05 22:45     ` Julien Grall
2019-03-06 11:46       ` Amit Tomer
2019-03-06 22:42         ` Stefano Stabellini
2019-03-06 22:59           ` Julien Grall
2019-03-07  8:42             ` Amit Tomer
2019-03-07 10:04               ` Julien Grall
2019-03-07 21:24                 ` Stefano Stabellini
2019-03-08 10:10                   ` Amit Tomer
2019-03-08 16:37                     ` Julien Grall
2019-03-08 17:44                       ` Amit Tomer
2019-03-06 11:30     ` Amit Tomer

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='CAF3u54CD7O0swVyTwMshxUhxnLg56=iF9S1xb5vKjuZq-F9BKQ@mail.gmail.com' \
    --to=julien.grall@gmail.com \
    --cc=julien.grall@arm.com \
    --cc=nd@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=stefanos@xilinx.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 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.