Re: [Xen-devel] [PATCH v3] x86/vpmu: add cpu hot unplug notifier for vpmu

2017-05-23 Thread Jan Beulich
>>> On 23.05.17 at 03:47, wrote: >> >>> On 21.05.17 at 15:09, wrote: >> > @@ -394,8 +395,11 @@ int vpmu_load(struct vcpu *v, bool_t from_guest) >> > if ( !vpmu_is_set(vpmu, VPMU_CONTEXT_ALLOCATED) ) >> > return 0; >> > >> > -/* First time this VCPU is running here */ >> > -i

Re: [Xen-devel] [PATCH v3] x86/vpmu: add cpu hot unplug notifier for vpmu

2017-05-22 Thread Kang, Luwei
> >>> On 21.05.17 at 15:09, wrote: > > v3: > > 1.add cpu_online() check in vpm_load() and vpmu_arch_destroy(); > > 2.add vpmu_ prefix. rename cpu_callback() to vpmu_cpu_callback(); > > I had specifically objected to the latter. Sorry, will rollback it. > > > @@ -394,8 +395,11 @@ int vpmu_load

Re: [Xen-devel] [PATCH v3] x86/vpmu: add cpu hot unplug notifier for vpmu

2017-05-22 Thread Jan Beulich
>>> On 21.05.17 at 15:09, wrote: > v3: > 1.add cpu_online() check in vpm_load() and vpmu_arch_destroy(); > 2.add vpmu_ prefix. rename cpu_callback() to vpmu_cpu_callback(); I had specifically objected to the latter. > @@ -394,8 +395,11 @@ int vpmu_load(struct vcpu *v, bool_t from_guest) >

[Xen-devel] [PATCH v3] x86/vpmu: add cpu hot unplug notifier for vpmu

2017-05-21 Thread Luwei Kang
Currently, Hot unplug a physical CPU with vpmu enabled may cause system hang due to send a remote call to an offlined pCPU. This patch add a cpu hot unplug notifer to save vpmu context before cpu offline. Consider one scenario, hot unplug pCPU N with vpmu enabled. The vcpu which running on this pC