From: Jan Beulich Date: Wed, 24 Nov 2021 10:01:05 +0000 (+0100) Subject: x86/PV: drop "vcpu" local variable from show_guest_stack() X-Git-Tag: archive/raspbian/4.17.0-1+rpi1^2~33^2~1333 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=95d1511fe0a3e603e2604574da65d2eb8c541baf;p=xen.git x86/PV: drop "vcpu" local variable from show_guest_stack() It's not really needed and has been misleading me more than once to try and spot its "actual" use(s). It should really have been dropped when the 32-bit specific logic was purged from here. Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné --- diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index d483aa91f2..84c9d9686a 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -327,16 +327,13 @@ static void show_guest_stack(struct vcpu *v, const struct cpu_user_regs *regs) if ( v != current ) { - struct vcpu *vcpu; - if ( !guest_kernel_mode(v, regs) ) { printk("User mode stack\n"); return; } - vcpu = maddr_get_owner(read_cr3()) == v->domain ? v : NULL; - if ( !vcpu ) + if ( maddr_get_owner(read_cr3()) != v->domain ) { stack_page = stack = do_page_walk(v, (unsigned long)stack); if ( (unsigned long)stack < PAGE_SIZE )