x86/vpmu: add cpu hot unplug notifier for vpmu
PATCH 1/1 x86/vpmu: add cpu hot unplug notifier for vpmu
Currently, hot unplug a cpu with vpmu enabled may cause system hang due to send IPI to a die physical cpu. This patch add a cpu hot unplug notifer to save vpmu context before cpu offline.
Consider one scene, hotplug physical cpu N with vpmu is enabled. The vcpu which running on this physical cpu before will be switch to other online cpu. Before load the vpmu context to new physical cpu, a IPI will be send to cpu N to save the vpmu context. System will hang in function on_select_cpus because of that physical cpu is offline and can not do any response.
--- xen/arch/x86/cpu/vpmu.c | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-)
xen/arch/x86/cpu/vpmu.c +34 -2
@@ -35,6 +35,7 @@#include <asm/apic.h> #include <public/pmu.h> #include <xsm/xsm.h> +#include <xen/cpu.h> #include <compat/pmu.h> CHECK_pmu_cntr_pair;
@@ -835,6 +836,36 @@ long do_xenpmu_op(unsigned int op, XEN_GUEST_HANDLE_PARAM(xen_pmu_params_t) arg)return ret; } +static int cpu_callback (struct notifier_block *nfb,unsigned long action,void *hcpu) +{ +unsigned int cpu = (unsigned long )hcpu; +struct vcpu *vcpu =per_cpu (last_vcpu, cpu); +struct vpmu_struct *vpmu; + +if ( !vcpu ) +return NOTIFY_DONE ; + + vpmu =vcpu_vpmu (vcpu); +if ( !vpmu_is_set (vpmu,VPMU_CONTEXT_ALLOCATED ) ) +return NOTIFY_DONE ; + +switch ( action ) + { +case CPU_DYING : +vpmu_save_force (vcpu); +vpmu_reset (vpmu,VPMU_CONTEXT_LOADED ); +break ; +default : +break ; + } + +return NOTIFY_DONE ; +} + +static struct notifier_block vpmu_cpu_nfb = { + .notifier_call = cpu_callback +}; +static int __init vpmu_init (void ) {int vendor = current_cpu_data.x86_vendor;
@@ -871,10 +902,11 @@ static int __init vpmu_init(void)break ; } -if ( vpmu_mode !=XENPMU_MODE_OFF ) +if ( vpmu_mode !=XENPMU_MODE_OFF ) { +register_cpu_notifier (&vpmu_cpu_nfb); printk(XENLOG_INFO "VPMU: version " __stringify(XENPMU_VER_MAJ) "." __stringify(XENPMU_VER_MIN) "\n"); -else + }else opt_vpmu_enabled =0 ;return 0 ;
Signature · 7 lines
1.8.3.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 16.05.17 at 19:29, <[email protected]> wrote:
Currently, hot unplug a cpu with vpmu enabled may cause system hang due to send IPI to a die physical cpu. This patch add a cpu hot unplug notifer to save vpmu context before cpu offline.
Consider one scene, hotplug physical cpu N with vpmu is enabled.
I think you mean "scenario" and "hot unplug".
Quoted 5 lines
The vcpu which running on this physical cpu before will be switch to other online cpu. Before load the vpmu context to new physical cpu, a IPI will be send to cpu N to save the vpmu context. System will hang in function
on_select_cpusbecause of that physical cpu is offline and can not do any response.
Doesn't this make clear that you would better also make sure ->last_pcpu doesn't hold to the then stale CPU anymore? For example, vpmu_load() compares it with smp_processor_id() (the subsequent use is guarded by a VPMU_CONTEXT_LOADED flag check), allowing badness if the same or another CPU with the same number comes up again quickly enough. Similarly vpmu_arch_destroy() uses it without checking VPMU_CONTEXT_LOADED.
xen/arch/x86/cpu/vpmu.c line 38
Quoted 7 lines
xen/arch/x86/cpu/vpmu.c +1
-0@@ -35,6 +35,7 @@#include <asm/apic.h> #include <public/pmu.h> #include <xsm/xsm.h> +#include <xen/cpu.h>
Please place this in the group of other xen/ includes.
Quoted 11 lines
xen/arch/x86/cpu/vpmu.c +11
-0+static int cpu_callback (struct notifier_block *nfb,unsigned long action,void *hcpu) +{ +unsigned int cpu = (unsigned long )hcpu; +struct vcpu *vcpu =per_cpu (last_vcpu, cpu); +struct vpmu_struct *vpmu; + +if ( !vcpu ) +return NOTIFY_DONE ; + + vpmu =vcpu_vpmu (vcpu); +if ( !vpmu_is_set (vpmu,VPMU_CONTEXT_ALLOCATED ) )
xen/arch/x86/cpu/vpmu.c long do_xenpmu_op(unsigned int op, XEN_GUEST_HANDLE_PARAM(xen_pmu_params_t) arg) · line 859
Quoted 10 lines
xen/arch/x86/cpu/vpmu.c +10
-0+return NOTIFY_DONE ; + +switch ( action ) + { +case CPU_DYING : +vpmu_save_force (vcpu); +vpmu_reset (vpmu,VPMU_CONTEXT_LOADED ); +break ; +default : +break ;
Pointless default case.
xen/arch/x86/cpu/vpmu.c static int __init vpmu_init(void) · line 909
Quoted 11 lines
xen/arch/x86/cpu/vpmu.c +3
-2@@ -871,10 +902,11 @@ static int __init vpmu_init(void)break ; } -if ( vpmu_mode !=XENPMU_MODE_OFF ) +if ( vpmu_mode !=XENPMU_MODE_OFF ) { +register_cpu_notifier (&vpmu_cpu_nfb); printk(XENLOG_INFO "VPMU: version " __stringify(XENPMU_VER_MAJ) "." __stringify(XENPMU_VER_MIN) "\n"); -else + }else
Coding style (brace placement).
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 15 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 16.05.17 at 19:29, <[email protected]> wrote:
Currently, hot unplug a cpu with vpmu enabled may cause system hang due to send IPI to a die physical cpu. This patch add a cpu hot unplug notifer to save vpmu context before cpu offline.
Consider one scene, hotplug physical cpu N with vpmu is enabled.
I think you mean "scenario" and "hot unplug".
Quoted 5 lines
The vcpu which running on this physical cpu before will be switch to other online cpu. Before load the vpmu context to new physical cpu, a IPI will be send to cpu N to save the vpmu context.
System will hang in functionon_select_cpusbecause of that physical cpu is offline and can not do any response.
Quoted 5 lines
Doesn't this make clear that you would better also make sure
->last_pcpu doesn't hold to the then stale CPU anymore? For
example,vpmu_load()compares it withsmp_processor_id()(the subsequent use is guarded by aVPMU_CONTEXT_LOADEDflag check), allowing badness if the same or another CPU with the same number comes up again quickly enough. Similarlyvpmu_arch_destroy()uses it without checkingVPMU_CONTEXT_LOADED.
Hi Jan,
I think it may can't make sure "->last_pcpu" doesn't hold to the then stale CPU. The purpose of this notifier is to save the vpmu context before cpu offline. Avoid save vpmu context by send IPI to that offline cpu. There is no reason to change the value except it saving (vpmu_save()) in another physical cpu.
Regarding vpmu_arch_destroy(), it indeed will cause same issue. What about add " this_cpu(cpu) = NULL" in cpu_callback() to clean the last_vcpu pointer of this physical cpu.
In addition, add VPMU_CONTEXT_LOADED check before execute on_selected_cpus(cpumask_of(vcpu_vpmu(v)->last_pcpu), vpmu_save_force, v, 1) in vpmu_arch_destroy(). Because of force save operation has been finished in notifier function.Thanks,
Luwei Kang
Quoted 49 lines
xen/arch/x86/cpu/vpmu.c line 38
Quoted 8 lines
xen/arch/x86/cpu/vpmu.c +1
-0@@ -35,6 +35,7 @@#include <asm/apic.h> #include <public/pmu.h> #include <xsm/xsm.h> +#include <xen/cpu.h> Please place this in the group of other xen/ includes.
Quoted 11 lines
xen/arch/x86/cpu/vpmu.c +11
-0+static int cpu_callback (struct notifier_block *nfb,unsigned long +action,void *hcpu) { +unsigned int cpu = (unsigned long )hcpu; +struct vcpu *vcpu =per_cpu (last_vcpu, cpu); +struct vpmu_struct *vpmu; + +if ( !vcpu ) +return NOTIFY_DONE ; + + vpmu =vcpu_vpmu (vcpu); +if ( !vpmu_is_set (vpmu,VPMU_CONTEXT_ALLOCATED ) )xen/arch/x86/cpu/vpmu.c long do_xenpmu_op(unsigned int op, XEN_GUEST_HANDLE_PARAM(xen_pmu_params_t) arg) · line 859
Quoted 10 lines
xen/arch/x86/cpu/vpmu.c +10
-0+return NOTIFY_DONE ; + +switch ( action ) + { +case CPU_DYING : +vpmu_save_force (vcpu); +vpmu_reset (vpmu,VPMU_CONTEXT_LOADED ); +break ; +default : +break ;Pointless default case.
xen/arch/x86/cpu/vpmu.c static int __init vpmu_init(void) · line 909
Quoted 11 lines
xen/arch/x86/cpu/vpmu.c +3
-2@@ -871,10 +902,11 @@ static int __init vpmu_init(void)break ; } -if ( vpmu_mode !=XENPMU_MODE_OFF ) +if ( vpmu_mode !=XENPMU_MODE_OFF ) { +register_cpu_notifier (&vpmu_cpu_nfb); printk(XENLOG_INFO "VPMU: version " __stringify(XENPMU_VER_MAJ) "." __stringify(XENPMU_VER_MIN) "\n"); -else + }else Coding style (brace placement).
Quoted 1 line
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 21 lines
Quoted 16 lines
Quoted 7 lines · On 17.05.17 at 14:40, <[email protected]> wrote:
Quoted 1 line
Quoted 1 line · On 16.05.17 at 19:29, <[email protected]> wrote:
Currently, hot unplug a cpu with vpmu enabled may cause system hang due to send IPI to a die physical cpu. This patch add a cpu hot unplug notifer to save vpmu context before cpu offline.
Consider one scene, hotplug physical cpu N with vpmu is enabled.
I think you mean "scenario" and "hot unplug".
Quoted 5 lines
The vcpu which running on this physical cpu before will be switch to other online cpu. Before load the vpmu context to new physical cpu, a IPI will be send to cpu N to save the vpmu context.
System will hang in functionon_select_cpusbecause of that physical cpu is offline and can not do any response.Quoted 3 lines
Doesn't this make clear that you would better also make sure ->last_pcpu doesn't hold to the then stale CPU anymore? For example,
vpmu_load()compares it withsmp_processor_id()(the subsequent useis guarded by a
VPMU_CONTEXT_LOADEDflagQuoted 1 line
check), allowing badness if the same or another CPU with the same number
Quoted 8 lines
comes up again quickly enough. Similarly
Quoted 1 line
vpmu_arch_destroy()uses it without checkingVPMU_CONTEXT_LOADED.I think it may can't make sure "->last_pcpu" doesn't hold to the thenstale CPU. The purpose of this notifier is to save the vpmu context before cpu offline. Avoid save vpmu context by send IPI to that offline cpu. There is no reason to change the value except it saving (
vpmu_save()) in another physical cpu.
I'm afraid I don't understand most of your reply.
Quoted 3 lines
Regarding
vpmu_arch_destroy(), it indeed will cause same issue. What
about add "this_cpu(cpu)= NULL" incpu_callback()to clean thelast_vcpupointer of this physical cpu.
That's being done by vpmu_save_force() already afaict (assuming you mean this_cpu(last_vcpu)), albeit for whatever reason open coding this_cpu().
Quoted 4 lines
In addition, add
VPMU_CONTEXT_LOADEDcheck before executeon_selected_cpus(cpumask_of(vcpu_vpmu(v)->last_pcpu), vpmu_save_force, v, 1)invpmu_arch_destroy(). Because of force save operation has been finished in notifier function.
I'm not sure whether that would be correct. Boris?
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 35 lines · Jan Beulich
Quoted 18 lines
Quoted 9 lines
Quoted 7 lines · On 17.05.17 at 14:40, <[email protected]> wrote:
Quoted 1 line
Quoted 1 line · On 16.05.17 at 19:29, <[email protected]> wrote:
Currently, hot unplug a cpu with vpmu enabled may cause system hang due to send IPI to a die physical cpu. This patch add a cpu hot unplug notifer to save vpmu context before cpu offline.
Consider one scene, hotplug physical cpu N with vpmu is enabled.
I think you mean "scenario" and "hot unplug".
Quoted 8 lines
Quoted 5 lines
The vcpu which running on this physical cpu before will be switch to other online cpu. Before load the vpmu context to new physical cpu, a IPI will be send to cpu N to save the vpmu context.
System will hang in functionon_select_cpusbecause of that physical cpu is offline and can not do any response.Doesn't this make clear that you would better also make sure ->last_pcpu doesn't hold to the then stale CPU anymore? For example,
vpmu_load()compares it withsmp_processor_id()(the subsequent useis guarded by a
VPMU_CONTEXT_LOADEDflagQuoted 8 lines
Quoted 1 line
check), allowing badness if the same or another CPU with the same number
comes up again quickly enough. Similarly
Quoted 1 line
vpmu_arch_destroy()uses it without checkingVPMU_CONTEXT_LOADED.I think it may can't make sure "->last_pcpu" doesn't hold to the thenstale CPU. The purpose of this notifier is to save the vpmu context before cpu offline. Avoid save vpmu context by send IPI to that offline cpu. There is no reason to change the value except it saving (
vpmu_save()) in another physical cpu.I'm afraid I don't understand most of your reply.
Quoted 3 lines
Regarding
vpmu_arch_destroy(), it indeed will cause same issue. What
about add "this_cpu(cpu)= NULL" incpu_callback()to clean thelast_vcpupointer of this physical cpu.That's being done by
vpmu_save_force()already afaict (assuming you meanthis_cpu(last_vcpu)), albeit for whatever reason open codingthis_cpu().
Quoted 5 lines
Quoted 4 lines
In addition, add
VPMU_CONTEXT_LOADEDcheck before executeon_selected_cpus(cpumask_of(vcpu_vpmu(v)->last_pcpu), vpmu_save_force, v, 1)invpmu_arch_destroy(). Because of force save operation has been finished in notifier function.I'm not sure whether that would be correct. Boris?
I believe we still have a race with vpmu_load(): it can be past VPMU_CONTEXT_LOADED test and committed to the remote call when the remote VCPU becomes offlined.
Taking vpmu_lock in vpmu_load() and cpu_callback() (which IMO should be called vpmu_cpu_callback() or some such) may be one solution, although holding a lock across a remote call is not optimal, obviously.
And I think the same argument is applicable to vpmu_arch_destroy().
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 42 lines
Quoted 1 line
Quoted 1 line · On 17.05.17 at 15:58, <[email protected]> wrote:
Quoted 40 lines · Jan Beulich
Quoted 19 lines
Quoted 9 lines
Quoted 7 lines · On 17.05.17 at 14:40, <[email protected]> wrote:
Quoted 1 line
Quoted 1 line · On 16.05.17 at 19:29, <[email protected]> wrote:
Currently, hot unplug a cpu with vpmu enabled may cause system hang due to send IPI to a die physical cpu. This patch add a cpu hot unplug notifer to save vpmu context before cpu offline.
Consider one scene, hotplug physical cpu N with vpmu is enabled.
I think you mean "scenario" and "hot unplug".
Quoted 8 lines
Quoted 5 lines
The vcpu which running on this physical cpu before will be switch to other online cpu. Before load the vpmu context to new physical cpu, a IPI will be send to cpu N to save the vpmu context.
System will hang in functionon_select_cpusbecause of that physical cpu is offline and can not do any response.Doesn't this make clear that you would better also make sure ->last_pcpu doesn't hold to the then stale CPU anymore? For example,
vpmu_load()compares it withsmp_processor_id()(the subsequent useis guarded by a
VPMU_CONTEXT_LOADEDflagQuoted 8 lines
Quoted 1 line
check), allowing badness if the same or another CPU with the same number
comes up again quickly enough. Similarly
Quoted 1 line
vpmu_arch_destroy()uses it without checkingVPMU_CONTEXT_LOADED.I think it may can't make sure "->last_pcpu" doesn't hold to the thenstale CPU. The purpose of this notifier is to save the vpmu context before cpu offline. Avoid save vpmu context by send IPI to that offline cpu. There is no reason to change the value except it saving (
vpmu_save()) in another physical cpu.I'm afraid I don't understand most of your reply.
Quoted 3 lines
Regarding
vpmu_arch_destroy(), it indeed will cause same issue. What
about add "this_cpu(cpu)= NULL" incpu_callback()to clean thelast_vcpupointer of this physical cpu.That's being done by
vpmu_save_force()already afaict (assuming you meanthis_cpu(last_vcpu)), albeit for whatever reason open codingthis_cpu().Quoted 4 lines
In addition, add
VPMU_CONTEXT_LOADEDcheck before executeon_selected_cpus(cpumask_of(vcpu_vpmu(v)->last_pcpu), vpmu_save_force, v, 1)invpmu_arch_destroy(). Because of force save operation has been finished in notifier function.
Quoted 6 lines
Quoted 1 line
I'm not sure whether that would be correct. Boris?
I believe we still have a race with
vpmu_load(): it can be pastVPMU_CONTEXT_LOADEDtest and committed to the remote call when the remote VCPU becomes offlined.
The offlined entity is a pCPU, and such offlining happens in stop- machine context iirc.
Jan
Quoted 7 lines
Taking
vpmu_lockinvpmu_load()andcpu_callback()(which IMO should be calledvpmu_cpu_callback()or some such) may be one solution, although holding a lock across a remote call is not optimal, obviously.And I think the same argument is applicable to
vpmu_arch_destroy().-boris
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 41 lines · Jan Beulich
Quoted 41 lines
Quoted 1 line
Quoted 1 line · On 17.05.17 at 15:58, <[email protected]> wrote:
Quoted 39 lines · Jan Beulich
Quoted 18 lines
Quoted 9 lines
Quoted 7 lines · On 17.05.17 at 14:40, <[email protected]> wrote:
Quoted 1 line
Quoted 1 line · On 16.05.17 at 19:29, <[email protected]> wrote:
Currently, hot unplug a cpu with vpmu enabled may cause system hang due to send IPI to a die physical cpu. This patch add a cpu hot unplug notifer to save vpmu context before cpu offline.
Consider one scene, hotplug physical cpu N with vpmu is enabled.
I think you mean "scenario" and "hot unplug".
Quoted 8 lines
Quoted 5 lines
The vcpu which running on this physical cpu before will be switch to other online cpu. Before load the vpmu context to new physical cpu, a IPI will be send to cpu N to save the vpmu context.
System will hang in functionon_select_cpusbecause of that physical cpu is offline and can not do any response.Doesn't this make clear that you would better also make sure ->last_pcpu doesn't hold to the then stale CPU anymore? For example,
vpmu_load()compares it withsmp_processor_id()(the subsequent useis guarded by a
VPMU_CONTEXT_LOADEDflagQuoted 8 lines
Quoted 1 line
check), allowing badness if the same or another CPU with the same number
comes up again quickly enough. Similarly
Quoted 1 line
vpmu_arch_destroy()uses it without checkingVPMU_CONTEXT_LOADED.I think it may can't make sure "->last_pcpu" doesn't hold to the thenstale CPU. The purpose of this notifier is to save the vpmu context before cpu offline. Avoid save vpmu context by send IPI to that offline cpu. There is no reason to change the value except it saving (
vpmu_save()) in another physical cpu.I'm afraid I don't understand most of your reply.
Quoted 3 lines
Regarding
vpmu_arch_destroy(), it indeed will cause same issue. What
about add "this_cpu(cpu)= NULL" incpu_callback()to clean thelast_vcpupointer of this physical cpu.That's being done by
vpmu_save_force()already afaict (assuming you meanthis_cpu(last_vcpu)), albeit for whatever reason open codingthis_cpu().Quoted 4 lines
In addition, add
VPMU_CONTEXT_LOADEDcheck before executeon_selected_cpus(cpumask_of(vcpu_vpmu(v)->last_pcpu), vpmu_save_force, v, 1)invpmu_arch_destroy(). Because of force save operation has been finished in notifier function.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
I'm not sure whether that would be correct. Boris?
I believe we still have a race with
vpmu_load(): it can be pastVPMU_CONTEXT_LOADEDtest and committed to the remote call when the remote VCPU becomes offlined.The offlined entity is a pCPU, and such offlining happens in stop- machine context iirc.
Oh, then I think this should work --- remote calls are predicated on VPMU_CONTEXT_LOADED being set and the callback will clear it.
Nevertheless, I'd still make sure that last_pcpu doesn't point to an offlined processor.
-boris
Quoted 12 lines
Jan
Quoted 7 lines
Taking
vpmu_lockinvpmu_load()andcpu_callback()(which IMO should be calledvpmu_cpu_callback()or some such) may be one solution, although holding a lock across a remote call is not optimal, obviously.And I think the same argument is applicable to
vpmu_arch_destroy().-boris
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 50 lines
Quoted 1 line
Quoted 1 line · On 17.05.17 at 16:32, <[email protected]> wrote:
Quoted 34 lines · Jan Beulich
Quoted 34 lines
Quoted 1 line
Quoted 1 line · On 17.05.17 at 15:58, <[email protected]> wrote:
Quoted 32 lines · Jan Beulich
Quoted 19 lines
Quoted 9 lines
Quoted 7 lines · On 17.05.17 at 14:40, <[email protected]> wrote:
Quoted 1 line
Quoted 1 line · On 16.05.17 at 19:29, <[email protected]> wrote:
Currently, hot unplug a cpu with vpmu enabled may cause system hang due to send IPI to a die physical cpu. This patch add a cpu hot unplug notifer to save vpmu context before cpu offline.
Consider one scene, hotplug physical cpu N with vpmu is enabled.
I think you mean "scenario" and "hot unplug".
Quoted 8 lines
Quoted 5 lines
The vcpu which running on this physical cpu before will be switch to other online cpu. Before load the vpmu context to new physical cpu, a IPI will be send to cpu N to save the vpmu context.
System will hang in functionon_select_cpusbecause of that physical cpu is offline and can not do any response.Doesn't this make clear that you would better also make sure ->last_pcpu doesn't hold to the then stale CPU anymore? For example,
vpmu_load()compares it withsmp_processor_id()(the subsequent useis guarded by a
VPMU_CONTEXT_LOADEDflagQuoted 8 lines
Quoted 1 line
check), allowing badness if the same or another CPU with the same number
comes up again quickly enough. Similarly
Quoted 1 line
vpmu_arch_destroy()uses it without checkingVPMU_CONTEXT_LOADED.I think it may can't make sure "->last_pcpu" doesn't hold to the thenstale CPU. The purpose of this notifier is to save the vpmu context before cpu offline. Avoid save vpmu context by send IPI to that offline cpu. There is no reason to change the value except it saving (
vpmu_save()) in another physical cpu.I'm afraid I don't understand most of your reply.
Quoted 3 lines
Regarding
vpmu_arch_destroy(), it indeed will cause same issue. What
about add "this_cpu(cpu)= NULL" incpu_callback()to clean thelast_vcpupointer of this physical cpu.Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
That's being done by
vpmu_save_force()already afaict (assuming you meanthis_cpu(last_vcpu)), albeit for whatever reason open codingthis_cpu().Quoted 2 lines
In addition, add
VPMU_CONTEXT_LOADEDcheck before executeon_selected_cpus(cpumask_of(vcpu_vpmu(v)->last_pcpu), vpmu_save_force, v, 1)in
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Quoted 2 lines
vpmu_arch_destroy(). Because of force save operation has been finished in notifier function.I'm not sure whether that would be correct. Boris?
I believe we still have a race with
vpmu_load(): it can be pastVPMU_CONTEXT_LOADEDtest and committed to the remote call when the remote VCPU becomes offlined.
Quoted 8 lines
Quoted 2 lines
The offlined entity is a pCPU, and such offlining happens in stop- machine context iirc.
Oh, then I think this should work --- remote calls are predicated on
VPMU_CONTEXT_LOADEDbeing set and the callback will clear it.Nevertheless, I'd still make sure that
last_pcpudoesn't point to an offlined processor.
Well, we can't reasonably use some random online one; my intention rather was to write some visibly invalid value there, so that comparing with any possibly online CPU would always produce false.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel