Beispiel #1
0
static bool __xen_has_pv_device(int state)
{
	/* HVM domains might or might not */
	if (xen_hvm_domain() && (xen_platform_pci_unplug & state))
		return true;

	return xen_has_pv_devices();
}
Beispiel #2
0
static int __init xen_tpmfront_init(void)
{
	if (!xen_domain())
		return -ENODEV;

	if (!xen_has_pv_devices())
		return -ENODEV;

	return xenbus_register_frontend(&tpmfront_driver);
}
Beispiel #3
0
static int __init xenkbd_init(void)
{
	if (!xen_domain())
		return -ENODEV;

	/* Nothing to do if running in dom0. */
	if (xen_initial_domain())
		return -ENODEV;

	if (!xen_has_pv_devices())
		return -ENODEV;

	return xenbus_register_frontend(&xenkbd_driver);
}
/**
 * Initializes the OpenXT input module.
 */
static int __init oxtkbd_init(void)
{
    //If we're not on Xen, we definitely don't apply.
    if (!xen_domain())
        return -ENODEV;

    //For now, there's no sense in running this from dom0,
    //as it has direct access to the keyboard. This may change,
    //depending on disaggregation specifics.
    if (xen_initial_domain())
        return -ENODEV;

    //If we can't use the XenBus, fail out.
    if (!xen_has_pv_devices())
        return -ENODEV;

    //Otheriwse, register our driver!
    return xenbus_register_frontend(&oxtkbd_driver);
}