public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
* getting memory footprint of new kernel
@ 2013-01-18 16:38 Olaf Hering
  2013-01-18 19:41 ` [PATCH 1/2] kexec_newkernel_phys and kexec_newkernel_memsz Olaf Hering
  2013-01-18 19:44 ` [PATCH 2/2] register_balloon_populate_range Olaf Hering
  0 siblings, 2 replies; 3+ messages in thread
From: Olaf Hering @ 2013-01-18 16:38 UTC (permalink / raw)
  To: kexec


I'm working on kexec support for a ballooned Xen PVonHVM guest.

One of the issues is that the new kernel must run in populated memory,
otherwise it will access ballooned pages and crash.

The kexec syscall passes several physical memory ranges in
kexec_segment->{mem,memsz}. Thats enough info to populate the purgatory
code and early startup code of the new kernel. 

But it lacks the memory range of the new kernel. From my understanding
the entry point is know by kexec(1), it is
kexec/arch/i386/kexec-bzImage.c:do_bzImage_load():kernel32_load_addr
The memory size howver is not known, and I dont see a way to retreive
this information from a bzImage. I think it should be all in the ELF
data of the compressed vmlinux.bin, but this compressed content is not
accessible. 

So what would be a good way to know or estimate the memory size of the
new kernel, and pass the start and size to the balloon driver so that it
can populate the range? I see there are already a few kexec related
sysfs files in kernel/ksysfs.c. What about something like
kexec_newkernel_phys and kexec_newkernel_memsz?

Olaf

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

end of thread, other threads:[~2013-01-18 19:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-18 16:38 getting memory footprint of new kernel Olaf Hering
2013-01-18 19:41 ` [PATCH 1/2] kexec_newkernel_phys and kexec_newkernel_memsz Olaf Hering
2013-01-18 19:44 ` [PATCH 2/2] register_balloon_populate_range Olaf Hering

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox