When booted as the initial domain (most commonly in PV-shim mode), the console
and xenbus rings aren't configured, as it is the responsibility of the initial
domain to provide xenconsole/xenstored services for other domains.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
panic("Hypercall page not initialised correctly\n");
}
+static bool is_initdomain(void)
+{
+ if ( IS_DEFINED(CONFIG_PV) )
+ return pv_start_info->flags & SIF_INITDOMAIN;
+ else
+ return pvh_start_info && pvh_start_info->flags & SIF_INITDOMAIN;
+}
+
static void setup_pv_console(void)
{
xencons_interface_t *cons_ring;
init_hypercalls();
- setup_pv_console();
+ if ( !is_initdomain() )
+ {
+ setup_pv_console();
+ setup_xenbus();
+ }
+
map_shared_info();
- setup_xenbus();
}
/*
typedef struct xen_pv_start_info xen_pv_start_info_t;
#endif
+/* These flags are passed in the 'flags' field of start_info_t. */
+#define SIF_PRIVILEGED (1u << 0) /* Is the domain privileged? */
+#define SIF_INITDOMAIN (1u << 1) /* Is this the initial control domain? */
+
/* MMU UPDATE operations */
#ifndef __ASSEMBLY__
struct mmu_update {