]> xenbits.xensource.com Git - xen.git/commitdiff
x86/PV: drop "vcpu" local variable from show_guest_stack()
authorJan Beulich <jbeulich@suse.com>
Wed, 24 Nov 2021 10:01:05 +0000 (11:01 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 24 Nov 2021 10:01:05 +0000 (11:01 +0100)
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 <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/traps.c

index d483aa91f2f17aab0ca16f6bbb225480109f1543..84c9d9686a090067811ee2ce400bbb08d0f9726b 100644 (file)
@@ -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 )