[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Disable xen bus and grant tables when supervisor_mode_kernel is enabled.
# HG changeset patch # User Ian.Campbell@xxxxxxxxxxxxx # Node ID f6a7f2657ff3d3e5a8e93949c39c632402d5b668 # Parent 4860a15edc1ce1ada03689ef6950dc169c1de44b Disable xen bus and grant tables when supervisor_mode_kernel is enabled. Neither of these features are useful/available in this mode since only a single domain is supported. Do not attempt to initialise xen bus when supervisor_mode_kernel is enabled. Do not BUG_ON() failure to setup grant tables, future versions of supervisor_mode_kernel may return -ENOSYS here. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxxxxx> diff -r 4860a15edc1c -r f6a7f2657ff3 linux-2.6-xen-sparse/drivers/xen/core/gnttab.c --- a/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c Fri Mar 31 09:24:17 2006 +++ b/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c Fri Mar 31 10:04:42 2006 @@ -395,7 +395,10 @@ setup.frame_list = frames; rc = HYPERVISOR_grant_table_op(GNTTABOP_setup_table, &setup, 1); - BUG_ON(rc || setup.status); + if (rc < 0) + return rc; + + BUG_ON(setup.status); #ifndef __ia64__ if (shared == NULL) { @@ -436,7 +439,8 @@ if (xen_init() < 0) return -ENODEV; - BUG_ON(gnttab_resume()); + if (gnttab_resume() < 0) + return -ENODEV; for (i = NR_RESERVED_ENTRIES; i < NR_GRANT_ENTRIES; i++) gnttab_list[i] = i + 1; diff -r 4860a15edc1c -r f6a7f2657ff3 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c Fri Mar 31 09:24:17 2006 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c Fri Mar 31 10:04:42 2006 @@ -998,6 +998,14 @@ device_register(&xenbus_backend.dev); /* + * The supervisor_mode_kernel feature only allows a single + * domain so there is no need to initialise event channels + * etc. + */ + if (xen_feature(XENFEAT_supervisor_mode_kernel)) + return -ENODEV; + + /* * Domain0 doesn't have a store_evtchn or store_mfn yet. */ dom0 = (xen_start_info->store_evtchn == 0); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |