]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
x86/xen: Don't register Xen IPIs when they aren't going to be used
authorDavid Woodhouse <dwmw@amazon.co.uk>
Thu, 24 Dec 2020 11:21:00 +0000 (11:21 +0000)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 6 Jan 2021 15:33:17 +0000 (15:33 +0000)
In the case where xen_have_vector_callback is false, we still register
the IPI vectors in xen_smp_intr_init() for the secondary CPUs even
though they aren't going to be used. Stop doing that.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
arch/x86/xen/enlighten_hvm.c

index ec50b7423a4c8609118f3f6f1ee67aa9dd238b31..e68ea5f4ad1ce0c3bfadafec4e01dc44fc2664e5 100644 (file)
@@ -164,10 +164,10 @@ static int xen_cpu_up_prepare_hvm(unsigned int cpu)
        else
                per_cpu(xen_vcpu_id, cpu) = cpu;
        rc = xen_vcpu_setup(cpu);
-       if (rc)
+       if (rc || !xen_have_vector_callback)
                return rc;
 
-       if (xen_have_vector_callback && xen_feature(XENFEAT_hvm_safe_pvclock))
+       if (xen_feature(XENFEAT_hvm_safe_pvclock))
                xen_setup_timer(cpu);
 
        rc = xen_smp_intr_init(cpu);