Fix vcpu restore path.
Subsystems (2)
PATCH 1/1 Fix vcpu restore path.
The runstate of vcpu should be restored for all possible cpus, as well as the vcpu info placement.
Signed-off-by Wei Liu <[email protected]>
--- arch/x86/xen/enlighten.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
arch/x86/xen/enlighten.c +4 -3
@@ -178,10 +178,11 @@ void xen_vcpu_restore(void) {int cpu; -for_each_online_cpu (cpu) { +for_each_possible_cpu (cpu) {bool other_cpu = (cpu !=smp_processor_id ()); +bool is_up =HYPERVISOR_vcpu_op (VCPUOP_is_up, cpu,NULL ); -if (other_cpu && +if (other_cpu && is_up &&HYPERVISOR_vcpu_op (VCPUOP_down, cpu,NULL ))BUG ();
@@ -190,7 +191,7 @@ void xen_vcpu_restore(void)if (have_vcpu_info_placement)xen_vcpu_setup (cpu); -if (other_cpu && +if (other_cpu && is_up &&HYPERVISOR_vcpu_op (VCPUOP_up, cpu,NULL ))BUG (); }
Signature · 1 line
1.7.10.4
Quoted 5 lines
Quoted 1 line
Quoted 1 line · Wei Liu
The runstate of vcpu should be restored for all possible cpus, as well as the vcpu info placement.
Signed-off-by Wei Liu <[email protected]>
Acked-by Jan Beulich <[email protected]>
Quoted 39 lines
--- arch/x86/xen/enlighten.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)arch/x86/xen/enlighten.c +4
-3@@ -178,10 +178,11 @@ void xen_vcpu_restore(void) {int cpu; -for_each_online_cpu (cpu) { +for_each_possible_cpu (cpu) {bool other_cpu = (cpu !=smp_processor_id ()); +bool is_up =HYPERVISOR_vcpu_op (VCPUOP_is_up, cpu,NULL ); -if (other_cpu && +if (other_cpu && is_up &&HYPERVISOR_vcpu_op (VCPUOP_down, cpu,NULL ))BUG ();@@ -190,7 +191,7 @@ void xen_vcpu_restore(void)if (have_vcpu_info_placement)xen_vcpu_setup (cpu); -if (other_cpu && +if (other_cpu && is_up &&HYPERVISOR_vcpu_op (VCPUOP_up, cpu,NULL ))BUG (); }Signature · 7 lines
1.7.10.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel