All of lore.kernel.org
 help / color / mirror / Atom feed
* dom0 pvops and rearranging memory layout
@ 2015-01-23 10:32 Juergen Gross
  2015-01-23 11:35 ` Andrew Cooper
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Juergen Gross @ 2015-01-23 10:32 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com, David Vrabel,
	Konrad Rzeszutek Wilk, Boris Ostrovsky
  Cc: Jan Beulich

Hi,

while testing new patches to support dom0 with more than 512 GB I
stumbled over an issue which - I think - is present in pvops for
some time now.

On boot the kernel rearranges the memory layout to match the host
E820 map. This is done to be able to access all I/O areas with
identity mapped pfns (pfn == mfn). So basically some memory pages
change their pfns while the mfns stay the same.

There is no check done whether the moved memory areas are actually
in use (e.g. via memblock_is_reserved()). This can lead to cases
where memory in use is put to an area which is made available for
new memory allocations soon afterwards. Memory in question could
be the initrd, the p2m map presented to dom0 by the hypervisor, or
(hopefully in theory only) even the kernel itself or it's initial
page tables built by the hypervisor.

In my test I had a p2m map of nearly 2GB size and the area between
2GB and 4GB had no RAM. So parts of the p2m map and the complete
initrd where subject to be remapped which led to an early PANIC.

I'll try to add some special handling for the initrd and the p2m
map. In case someone has a better idea: please tell me.


Juergen

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-01-23 15:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-23 10:32 dom0 pvops and rearranging memory layout Juergen Gross
2015-01-23 11:35 ` Andrew Cooper
2015-01-23 11:41   ` Juergen Gross
2015-01-23 12:03   ` Jan Beulich
     [not found]   ` <54C246980200007800058C51@suse.com>
2015-01-23 12:08     ` Juergen Gross
2015-01-23 12:42       ` Jan Beulich
2015-01-23 11:58 ` David Vrabel
2015-01-23 15:09 ` Konrad Rzeszutek Wilk
2015-01-23 15:16   ` Juergen Gross

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.