[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 31.01.2020 15:10, Wei Liu wrote:
> On Fri, Jan 31, 2020 at 02:53:45PM +0100, Jan Beulich wrote:
>> 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?
> 
> Xen guest's usage of APIC is no different than, say, hvm's usage. If hvm
> can be this far down, Xen / Hyper-V can, too.
> 
> Furthermore, APIC code has no dependency on guest code.

Hmm, okay, there's no way for a HVM guest to run without LAPIC
emulation right now. This should be fine then:
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

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®.