I've just had to deal with an early boot crash of Linux which occurred
so early that even "earlyprintk=xen" did not produce any useful output.
Hence the domain appeared to hang, while in fact it had brought down its
only vCPU. By translating this to a shutdown, the situation will be
better recognizable.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
break;
case VCPUOP_down:
+ for_each_vcpu ( d, v )
+ if ( v->vcpu_id != vcpuid && !test_bit(_VPF_down, &v->pause_flags) )
+ {
+ rc = 1;
+ break;
+ }
+
+ if ( !rc ) /* Last vcpu going down? */
+ {
+ domain_shutdown(d, SHUTDOWN_poweroff);
+ break;
+ }
+
+ rc = 0;
+ v = d->vcpu[vcpuid];
+
#ifdef CONFIG_X86
if ( pv_shim )
rc = continue_hypercall_on_cpu(0, pv_shim_cpu_down, v);