[PATCH] Driver Core: Add /sys/hypervisor when needed
To have a home for all hypervisors, this patch creates /sys/hypervisor. A new config option SYS_HYPERVISOR is introduced, which should to be set by architecture dependent hypervisors (e.g. s390 or Xen). Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e391553222
commit
4039483fd3
19
drivers/base/hypervisor.c
Normal file
19
drivers/base/hypervisor.c
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* hypervisor.c - /sys/hypervisor subsystem.
|
||||
*
|
||||
* This file is released under the GPLv2
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/kobject.h>
|
||||
#include <linux/device.h>
|
||||
|
||||
#include "base.h"
|
||||
|
||||
decl_subsys(hypervisor, NULL, NULL);
|
||||
EXPORT_SYMBOL_GPL(hypervisor_subsys);
|
||||
|
||||
int __init hypervisor_init(void)
|
||||
{
|
||||
return subsystem_register(&hypervisor_subsys);
|
||||
}
|
Reference in New Issue
Block a user