xc_osdep_info_t xc_osdep_info = {
.name = "Linux Native OS interface",
.init = &linux_osdep_init,
+ .fake = 0,
};
/*
xc_osdep_info_t xc_osdep_info = {
.name = "Minios Native OS interface",
.init = &minios_osdep_init,
+ .fake = 0,
};
/*
xc_osdep_info_t xc_osdep_info = {
.name = "Netbsd Native OS interface",
.init = &netbsd_osdep_init,
+ .fake = 0,
};
/*
return rc;
}
+int xc_interface_is_fake(void)
+{
+ xc_osdep_info_t info;
+
+ if ( xc_osdep_get_info(NULL, &info) < 0 )
+ return -1;
+
+ /* Have a copy of info so can release the interface now. */
+ xc_osdep_put(&info);
+
+ return info.fake;
+}
+
xc_interface *xc_interface_open(xentoollog_logger *logger,
xentoollog_logger *dombuild_logger,
unsigned open_flags)
xc_osdep_info_t xc_osdep_info = {
.name = "Solaris Native OS interface",
.init = &solaris_osdep_init,
+ .fake = 0,
};
/*
*/
int xc_interface_close(xc_interface *xch);
+/**
+ * Query the active OS interface (i.e. that which would be returned by
+ * xc_interface_open) to find out if it is fake (i.e. backends onto
+ * something other than an actual Xen hypervisor).
+ *
+ * @return 0 is "real", >0 if fake, -1 on error.
+ */
+int xc_interface_is_fake(void);
+
/*
* HYPERCALL SAFE MEMORY BUFFER
*
/* Returns ops function. */
xc_osdep_init_fn init;
+
+ /* True if this interface backs onto a fake Xen. */
+ int fake;
};
typedef struct xc_osdep_info xc_osdep_info_t;