From: Olaf Hering <olaf@aepfle.de>
To: kexec@lists.infradead.org
Subject: getting memory footprint of new kernel
Date: Fri, 18 Jan 2013 17:38:10 +0100 [thread overview]
Message-ID: <20130118163809.GA23530@aepfle.de> (raw)
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
next reply other threads:[~2013-01-18 16:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-18 16:38 Olaf Hering [this message]
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
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=20130118163809.GA23530@aepfle.de \
--to=olaf@aepfle.de \
--cc=kexec@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox