summaryrefslogtreecommitdiff
path: root/drivers/xen
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/Kconfig2
-rw-r--r--drivers/xen/hypervisor.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
index 0ee74d036c7..6cb9149fa77 100644
--- a/drivers/xen/Kconfig
+++ b/drivers/xen/Kconfig
@@ -1,6 +1,6 @@
config PVBLOCK
bool "Xen para-virtualized block device"
- depends on DM
+ depends on DM && XEN
select BLK
help
This driver implements the front-end of the Xen virtual
diff --git a/drivers/xen/hypervisor.c b/drivers/xen/hypervisor.c
index 16c7c96c94e..0b2311ba267 100644
--- a/drivers/xen/hypervisor.c
+++ b/drivers/xen/hypervisor.c
@@ -264,8 +264,15 @@ void clear_evtchn(uint32_t port)
int xen_init(void)
{
+ int el = current_el();
+
debug("%s\n", __func__);
+ if (el != 1) {
+ puts("XEN:\tnot running from EL1\n");
+ return 0;
+ }
+
map_shared_info(NULL);
init_events();
init_xenbus();