[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v5 03/12] x86/smp: don't online cpu if hypervisor_ap_setup fails



On 29.01.2020 21:20, Wei Liu wrote:
> Push hypervisor_ap_setup down to smp_callin.
> 
> Take the chance to replace xen_guest with cpu_has_hypervisor.
> 
> Signed-off-by: Wei Liu <liuwe@xxxxxxxxxxxxx>
> ---
>  xen/arch/x86/smpboot.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
> index c9d1ab4423..93b86a09e9 100644
> --- a/xen/arch/x86/smpboot.c
> +++ b/xen/arch/x86/smpboot.c
> @@ -199,6 +199,13 @@ static void smp_callin(void)
>          goto halt;
>      }
>  
> +    if ( cpu_has_hypervisor && (rc = hypervisor_ap_setup()) != 0 )
> +    {
> +        printk("CPU%d: Failed to initialise hypervisor functions. Not coming 
> online.\n", cpu);
> +        cpu_error = rc;
> +        goto halt;
> +    }

There are a few things done up from here which may possibly
better come after hypervisor interface setup (the two APIC
related calls in particular). Are you sure you can safely
move it this far down in the function?

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.