[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH for-4.12 v2 2/2] xen/arm: Stop relocating Xen



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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.