[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 4/4] x86/debug: move domain_pause_for_debugger to debugger.c
The function domain_pause_for_debugger() is conditionally compiled if CONFIG_CRASH_DEBUG=y. Instead of placing an extra #ifdef inside domain.c, this commit moves domain_pause_for_debugger() into x86/debugger.c which is only built by Kbuild given CONFIG_CRASH_DEBUG=y. Signed-off-by: Bobby Eshleman <bobby.eshleman@xxxxxxxxx> --- xen/arch/x86/debugger.c | 12 ++++++++++++ xen/arch/x86/domain.c | 14 -------------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/xen/arch/x86/debugger.c b/xen/arch/x86/debugger.c index 6f33f509ff..4f7c44600f 100644 --- a/xen/arch/x86/debugger.c +++ b/xen/arch/x86/debugger.c @@ -15,6 +15,18 @@ #include <xen/event.h> #include <xen/sched.h> +void domain_pause_for_debugger(void) +{ + struct vcpu *curr = current; + struct domain *d = curr->domain; + + domain_pause_by_systemcontroller_nosync(d); + + /* if gdbsx active, we just need to pause the domain */ + if ( curr->arch.gdbsx_vcpu_event == 0 ) + send_global_virq(VIRQ_DEBUGGER); +} + bool debugger_trap_entry( unsigned int vector, struct cpu_user_regs *regs) { diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index 47448f2f8c..545da32c3b 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -2540,20 +2540,6 @@ static int __init init_vcpu_kick_softirq(void) } __initcall(init_vcpu_kick_softirq); -#ifdef CONFIG_CRASH_DEBUG -void domain_pause_for_debugger(void) -{ - struct vcpu *curr = current; - struct domain *d = curr->domain; - - domain_pause_by_systemcontroller_nosync(d); - - /* if gdbsx active, we just need to pause the domain */ - if ( curr->arch.gdbsx_vcpu_event == 0 ) - send_global_virq(VIRQ_DEBUGGER); -} -#endif - /* * Local variables: * mode: C -- 2.30.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |