From 8e0da8c07f4f80e14314977a11f738bd74a5b62b Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Fri, 4 Oct 2013 12:58:20 +0200 Subject: x86: Improve information from domain_crash_synchronous As it currently stands, the string "domain_crash_sync called from entry.S" is not helpful at identifying why the domain was crashed, and a debug build of Xen doesn't help the matter This patch improves the information printed, by pointing to where the crash decision was made. Specific improvements include: * Moving the ascii string "domain_crash_sync called from entry.S\n" away from some semi-hot code cache lines. * Moving the printk into C code (especially as this_cpu() is miserable to use in assembly code) * Undo the previous confusing situation of having the domain_crash_synchronous() as a macro in C code, yet a global symbol in assembly code. Signed-off-by: Andrew Cooper Acked-by: Keir Fraser --- xen/include/xen/sched.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'xen/include/xen/sched.h') diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index 0013a8d8ce..1765e18269 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -547,6 +547,13 @@ void __domain_crash_synchronous(void) __attribute__((noreturn)); __domain_crash_synchronous(); \ } while (0) +/* + * Called from assembly code, with an optional address to help indicate why + * the crash occured. If addr is 0, look up address from last extable + * redirection. + */ +void asm_domain_crash_synchronous(unsigned long addr) __attribute__((noreturn)); + #define set_current_state(_s) do { current->state = (_s); } while (0) void scheduler_init(void); int sched_init_vcpu(struct vcpu *v, unsigned int processor); -- cgit v1.2.3