arm64: record register state at kernel mode page fault (for eclair)
Change-Id: I066bceecc0377110faaca0b21d45a476d000e684
This commit is contained in:
committed by
Masamichi Takagi
parent
92902d36fc
commit
623d6f8bc3
@@ -143,6 +143,11 @@ void arch_save_panic_regs(void *irq_regs)
|
|||||||
|
|
||||||
clv = get_arm64_this_cpu_local();
|
clv = get_arm64_this_cpu_local();
|
||||||
|
|
||||||
|
/* If kernel mode PF occurred, unroll the causing call stack */
|
||||||
|
if (cpu_local_var(kernel_mode_pf_regs)) {
|
||||||
|
regs = cpu_local_var(kernel_mode_pf_regs);
|
||||||
|
}
|
||||||
|
|
||||||
/* For user-space, use saved kernel context */
|
/* For user-space, use saved kernel context */
|
||||||
if (regs->pc < USER_END) {
|
if (regs->pc < USER_END) {
|
||||||
memset(clv->arm64_cpu_local_thread.panic_regs,
|
memset(clv->arm64_cpu_local_thread.panic_regs,
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ struct cpu_local_var {
|
|||||||
ihk_spinlock_t runq_lock;
|
ihk_spinlock_t runq_lock;
|
||||||
unsigned long runq_irqstate;
|
unsigned long runq_irqstate;
|
||||||
struct thread *current;
|
struct thread *current;
|
||||||
|
void *kernel_mode_pf_regs;
|
||||||
int prevpid;
|
int prevpid;
|
||||||
struct list_head runq;
|
struct list_head runq;
|
||||||
size_t runq_len;
|
size_t runq_len;
|
||||||
|
|||||||
@@ -1323,6 +1323,7 @@ static void unhandled_page_fault(struct thread *thread, void *fault_addr,
|
|||||||
ihk_mc_debug_show_interrupt_context(regs);
|
ihk_mc_debug_show_interrupt_context(regs);
|
||||||
|
|
||||||
if (!(reason & PF_USER)) {
|
if (!(reason & PF_USER)) {
|
||||||
|
cpu_local_var(kernel_mode_pf_regs) = regs;
|
||||||
panic("panic: kernel mode PF");
|
panic("panic: kernel mode PF");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user