Re: [Xen-devel] [PATCH] hvm: vmx/svm_cpu_up_prepare should be called only once

2017-08-18 Thread Jan Beulich
>>> On 17.08.17 at 17:04, wrote: > On 08/17/2017 10:59 AM, Jan Beulich wrote: > On 17.08.17 at 16:19, wrote: >>> --- a/xen/arch/x86/hvm/vmx/vmcs.c >>> +++ b/xen/arch/x86/hvm/vmx/vmcs.c >>> @@ -652,7 +652,7 @@ int vmx_cpu_up(void) >>> >>> INIT_LIST_HEAD(&this_cpu(active_vmcs_list)); >>>

Re: [Xen-devel] [PATCH] hvm: vmx/svm_cpu_up_prepare should be called only once

2017-08-17 Thread Andrew Cooper
On 17/08/17 15:19, Boris Ostrovsky wrote: > diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c > index 0dc9442..3e7b9fc 100644 > --- a/xen/arch/x86/hvm/svm/svm.c > +++ b/xen/arch/x86/hvm/svm/svm.c > @@ -1538,7 +1538,7 @@ static int _svm_cpu_up(bool bsp) > return -EINVAL;

Re: [Xen-devel] [PATCH] hvm: vmx/svm_cpu_up_prepare should be called only once

2017-08-17 Thread Boris Ostrovsky
On 08/17/2017 10:59 AM, Jan Beulich wrote: On 17.08.17 at 16:19, wrote: >> --- a/xen/arch/x86/hvm/vmx/vmcs.c >> +++ b/xen/arch/x86/hvm/vmx/vmcs.c >> @@ -652,7 +652,7 @@ int vmx_cpu_up(void) >> >> INIT_LIST_HEAD(&this_cpu(active_vmcs_list)); >> >> -if ( (rc = vmx_cpu_up_prepare(cp

Re: [Xen-devel] [PATCH] hvm: vmx/svm_cpu_up_prepare should be called only once

2017-08-17 Thread Jan Beulich
>>> On 17.08.17 at 16:19, wrote: > --- a/xen/arch/x86/hvm/vmx/vmcs.c > +++ b/xen/arch/x86/hvm/vmx/vmcs.c > @@ -652,7 +652,7 @@ int vmx_cpu_up(void) > > INIT_LIST_HEAD(&this_cpu(active_vmcs_list)); > > -if ( (rc = vmx_cpu_up_prepare(cpu)) != 0 ) > +if ( (cpu == 0) && (rc = vmx_cpu_

[Xen-devel] [PATCH] hvm: vmx/svm_cpu_up_prepare should be called only once

2017-08-17 Thread Boris Ostrovsky
These routines are first called via CPU_UP_PREPARE notifier by the BSP and then by the booting ASP from vmx_cpu_up()/_svm_cpu_up(). Avoid the unnecessary second call. Signed-off-by: Boris Ostrovsky Reported-by: Andrew Cooper --- xen/arch/x86/hvm/svm/svm.c | 2 +- xen/arch/x86/hvm/vmx/vmcs.c |