2015-07-10 17:21:29 +02:00
|
|
|
# Commit 142473cfce41a565898e0fa33dc98a1f5e41abe4
|
|
|
|
# Date 2015-06-25 14:57:04 +0200
|
|
|
|
# Author Andrew Cooper <andrew.cooper3@citrix.com>
|
|
|
|
# Committer Jan Beulich <jbeulich@suse.com>
|
|
|
|
x86/traps: avoid using current too early on boot
|
|
|
|
|
|
|
|
Early on boot, current has the sentinel value 0xfffff000. Blindly using it in
|
|
|
|
show_registers() causes a nested failure and no useful information printed
|
|
|
|
from an early crash.
|
|
|
|
|
|
|
|
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
|
|
|
|
|
|
|
--- a/xen/arch/x86/x86_64/traps.c
|
|
|
|
+++ b/xen/arch/x86/x86_64/traps.c
|
2015-08-27 00:28:15 +02:00
|
|
|
@@ -86,7 +86,7 @@ void show_registers(const struct cpu_use
|
2015-07-10 17:21:29 +02:00
|
|
|
struct cpu_user_regs fault_regs = *regs;
|
|
|
|
unsigned long fault_crs[8];
|
|
|
|
enum context context;
|
|
|
|
- struct vcpu *v = current;
|
|
|
|
+ struct vcpu *v = system_state >= SYS_STATE_smp_boot ? current : NULL;
|
|
|
|
|
|
|
|
if ( guest_mode(regs) && has_hvm_container_vcpu(v) )
|
|
|
|
{
|