All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Andrii Anisov <andrii.anisov@gmail.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Cc: Matthew Daley <mattd@bugfuzz.com>,
	"sstabellini@kernel.org" <sstabellini@kernel.org>
Subject: Re: [PATCH for-4.12 v2 2/2] xen/arm: Stop relocating Xen
Date: Fri, 14 Dec 2018 18:04:13 +0000	[thread overview]
Message-ID: <84968c09-b197-5194-53f2-b0c3837ec414@arm.com> (raw)
In-Reply-To: <9850ed66-1a28-4af4-7306-6c0922900ce1@gmail.com>

Hi,

On 14/12/2018 17:46, Andrii Anisov wrote:
>> How were you switching between the page-tables? A proper solution would require
>> to switch between page-tables using an identify mappings. This is far more
>> complicate than what is worth here.
> 
> Sorry for my ignorance, what "identify mappings" stands for?

I meant identity mapping sorry.

> Any links for the 
> problem description?

Have a look at "Using break-before-make when updating translation table entries" 
D5-2516 in ARM DDI 0487D.a. The underlying issue is you can't change the mapping 
with going through an invalid state. So if you switch between 2 page-tables you 
need roughly to:
	- Disable MMU
	- Flush TLBs
	- Switch page-tables
	- Enable MMU

The new set of page-tables needs to contain an identity mapping corresponding to 
where Xen is loaded in memory. Such mapping is quite difficult to have on Xen 
because the memory layout is static.

Just in case, I know that Xen does not respect that today. We are quite lucky so 
far that this didn't result to weird behavior when running Xen. Although, I am 
starting to see more report of interesting crash with newer processor. Removing 
the relocation is a first step towards avoiding to switch between page-tables.

>> Xen is free to allocate anything below 4GB. This is nothing new. But you should
>> not have two 128MB chunks stolen because of modules here. If that's the case
>> then there is a bug in Xen that should be fixed.
> 
> They are stolen from 1:1 memory allocation because of `allocate_memory_11()` 
> design and implementation.

Then the code needs to be fixed... It would be nice to get some helps here as I 
can't scale.

Cheers,

-- 
Julien Grall

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

  reply	other threads:[~2018-12-14 18:04 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-14 11:44 [PATCH for-4.12 v2 0/2] xen/arm: mm: Boot fixes Julien Grall
2018-12-14 11:44 ` [PATCH for-4.12 v2 1/2] xen/arm: mm: Use pte_xen_addr when creating xen entries Julien Grall
2018-12-14 21:44   ` Stefano Stabellini
2018-12-14 11:44 ` [PATCH for-4.12 v2 2/2] xen/arm: Stop relocating Xen Julien Grall
2018-12-14 15:52   ` Andrii Anisov
2018-12-14 16:09     ` Andrii Anisov
2018-12-14 16:26     ` Julien Grall
2018-12-14 17:24       ` Andrii Anisov
2018-12-14 17:48         ` Julien Grall
2018-12-17 11:11           ` Julien Grall
2018-12-17 16:02             ` Andrii Anisov
2018-12-17 16:56               ` Julien Grall
2018-12-17 17:57             ` Stefano Stabellini
2018-12-17 18:03               ` Julien Grall
2018-12-17 13:14           ` Andrii Anisov
2018-12-17 13:38             ` Julien Grall
2018-12-17 15:55               ` Andrii Anisov
2018-12-17 17:02                 ` Julien Grall
2018-12-17 17:34                   ` Andrii Anisov
2018-12-18 12:09                     ` Andrii Anisov
2018-12-18 13:13                       ` Julien Grall
2018-12-14 17:46       ` Andrii Anisov
2018-12-14 18:04         ` Julien Grall [this message]
2018-12-17 15:54           ` Andrii Anisov
2018-12-17 17:03             ` Julien Grall
2018-12-14 16:13   ` Andrii Anisov

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=84968c09-b197-5194-53f2-b0c3837ec414@arm.com \
    --to=julien.grall@arm.com \
    --cc=andrii.anisov@gmail.com \
    --cc=mattd@bugfuzz.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xen.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.