@@ -806,6 +806,7 @@ Specify the bit width of the DMA heap.
### dom0
= List of [ pv | pvh, shadow=<bool>, verbose=<bool>,
+ crashconsole=<bool>,
cpuid-faulting=<bool>, msr-relaxed=<bool> ] (x86)
= List of [ sve=<integer> ] (Arm64)
@@ -839,6 +840,10 @@ Controls for how dom0 is constructed on x86 systems.
information during the dom0 build. It defaults to the compile time choice
of `CONFIG_VERBOSE_DEBUG`.
+* The `crashconsole` boolean instructs Xen to drop into emergency console
+ in case of dom0 crash. May be useful for dom0 bringup on a custom
+ hardware.
+
* The `cpuid-faulting` boolean is an interim option, is only applicable to
PV dom0, and defaults to true.
@@ -286,6 +286,8 @@ int __init parse_arch_dom0_param(const char *s, const char *e)
opt_dom0_cpuid_faulting = val;
else if ( (val = parse_boolean("msr-relaxed", s, e)) >= 0 )
opt_dom0_msr_relaxed = val;
+ else if ( (val = parse_boolean("crashconsole", s, e)) >= 0 )
+ opt_hwdom_crashconsole = !!val;
else
return -EINVAL;
@@ -68,5 +68,6 @@ extern bool opt_dom0_pvh;
extern bool opt_dom0_verbose;
extern bool opt_dom0_cpuid_faulting;
extern bool opt_dom0_msr_relaxed;
+extern bool opt_hwdom_crashconsole;
#endif
@@ -56,6 +56,13 @@ unsigned int xen_processor_pmbits = XEN_PROCESSOR_PM_PX;
bool opt_dom0_vcpus_pin;
boolean_param("dom0_vcpus_pin", opt_dom0_vcpus_pin);
+/*
+ * Hardware domain crash handler: if true, do not halt machine, but switch to
+ * Xen console for debugging.
+ */
+bool opt_hwdom_crashconsole;
+boolean_param("hwdom_crashconsole", opt_hwdom_crashconsole);
+
/* Protect updates/reads (resp.) of domain_list and domain_hash. */
DEFINE_SPINLOCK(domlist_update_lock);
DEFINE_RCU_READ_LOCK(domlist_read_lock);
@@ -1144,7 +1151,12 @@ int domain_shutdown(struct domain *d, u8 reason)
reason = d->shutdown_code;
if ( is_hardware_domain(d) )
- hwdom_shutdown(reason);
+ {
+ if ( opt_hwdom_crashconsole )
+ console_set_owner(DOMID_XEN);
+ else
+ hwdom_shutdown(reason);
+ }
if ( d->is_shutting_down )
{