From: Petr Tesarik <ptesarik@suse.cz>
To: kexec@lists.infradead.org
Cc: Norbert Trapp <Norbert.Trapp@ts.fujitsu.com>
Subject: [PATCHv3 5/9] Initialize phys_start during early Xen setup
Date: Fri, 24 Aug 2012 17:42:24 +0200 [thread overview]
Message-ID: <201208241742.24409.ptesarik@suse.cz> (raw)
With early Xen setup, we can move the initialization of xen_phys_start
to the setup routine. This is cleaner, as we can get rid of ifdef'ed
arch-specific code in makedumpfile.c (which should IMO stay generic).
Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
---
arch/x86.c | 9 +++++++++
arch/x86_64.c | 9 +++++++++
makedumpfile.c | 16 ----------------
3 files changed, 18 insertions(+), 16 deletions(-)
--- a/arch/x86.c
+++ b/arch/x86.c
@@ -296,6 +296,15 @@ int get_xen_basic_info_x86(void)
unsigned long frame_table_vaddr;
unsigned long xen_end;
+ if (!info->xen_phys_start) {
+ if (info->xen_crash_info_v < 2) {
+ ERRMSG("Can't get Xen physical start address.\n"
+ "Please use the --xen_phys_start option.");
+ return FALSE;
+ }
+ info->xen_phys_start = info->xen_crash_info.v2->xen_phys_start;
+ }
+
if (SYMBOL(pgd_l2) == NOT_FOUND_SYMBOL &&
SYMBOL(pgd_l3) == NOT_FOUND_SYMBOL) {
ERRMSG("Can't get pgd.\n");
--- a/arch/x86_64.c
+++ b/arch/x86_64.c
@@ -361,6 +361,15 @@ int get_xen_basic_info_x86_64(void)
unsigned long frame_table_vaddr;
unsigned long xen_end;
+ if (!info->xen_phys_start) {
+ if (info->xen_crash_info_v < 2) {
+ ERRMSG("Can't get Xen physical start address.\n"
+ "Please use the --xen_phys_start option.");
+ return FALSE;
+ }
+ info->xen_phys_start = info->xen_crash_info.v2->xen_phys_start;
+ }
+
if (SYMBOL(pgd_l4) == NOT_FOUND_SYMBOL) {
ERRMSG("Can't get pml4.\n");
return FALSE;
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -5365,20 +5365,6 @@ init_xen_crash_info(void)
}
int
-get_xen_phys_start(void)
-{
- if (info->xen_phys_start)
- return TRUE;
-
-#if defined(__x86__) || defined(__x86_64__)
- if (info->xen_crash_info_v >= 2)
- info->xen_phys_start = info->xen_crash_info.v2->xen_phys_start;
-#endif
-
- return TRUE;
-}
-
-int
get_xen_info(void)
{
unsigned long domain;
@@ -5877,8 +5863,6 @@ initial_xen(void)
if (!read_vmcoreinfo_from_vmcore(offset, size, TRUE))
return FALSE;
}
- if (!get_xen_phys_start())
- return FALSE;
if (!get_xen_info())
return FALSE;
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next reply other threads:[~2012-08-24 15:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-24 15:42 Petr Tesarik [this message]
2012-11-28 5:56 ` [PATCHv3 5/9] Initialize phys_start during early Xen setup Atsushi Kumagai
2012-12-03 6:28 ` Atsushi Kumagai
2012-12-03 10:10 ` Petr Tesarik
2012-12-04 8:36 ` Atsushi Kumagai
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=201208241742.24409.ptesarik@suse.cz \
--to=ptesarik@suse.cz \
--cc=Norbert.Trapp@ts.fujitsu.com \
--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