ia64/xen-unstable

changeset 9551:f6a7f2657ff3

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@xensource.com>
author Ian.Campbell@xensource.com
date Fri Mar 31 11:04:42 2006 +0100 (2006-03-31)
parents 4860a15edc1c
children 3838105ab03b
files linux-2.6-xen-sparse/drivers/xen/core/gnttab.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c	Fri Mar 31 10:24:17 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c	Fri Mar 31 11:04:42 2006 +0100
     1.3 @@ -395,7 +395,10 @@ gnttab_resume(void)
     1.4  	setup.frame_list = frames;
     1.5  
     1.6  	rc = HYPERVISOR_grant_table_op(GNTTABOP_setup_table, &setup, 1);
     1.7 -	BUG_ON(rc || setup.status);
     1.8 +	if (rc < 0)
     1.9 +		return rc;
    1.10 +
    1.11 +	BUG_ON(setup.status);
    1.12  
    1.13  #ifndef __ia64__
    1.14  	if (shared == NULL) {
    1.15 @@ -436,7 +439,8 @@ gnttab_init(void)
    1.16  	if (xen_init() < 0)
    1.17  		return -ENODEV;
    1.18  
    1.19 -	BUG_ON(gnttab_resume());
    1.20 +	if (gnttab_resume() < 0)
    1.21 +		return -ENODEV;
    1.22  
    1.23  	for (i = NR_RESERVED_ENTRIES; i < NR_GRANT_ENTRIES; i++)
    1.24  		gnttab_list[i] = i + 1;
     2.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Fri Mar 31 10:24:17 2006 +0100
     2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Fri Mar 31 11:04:42 2006 +0100
     2.3 @@ -998,6 +998,14 @@ static int __init xenbus_probe_init(void
     2.4  	device_register(&xenbus_backend.dev);
     2.5  
     2.6  	/*
     2.7 +         * The supervisor_mode_kernel feature only allows a single
     2.8 +         * domain so there is no need to initialise event channels
     2.9 +         * etc.
    2.10 +         */
    2.11 +	if (xen_feature(XENFEAT_supervisor_mode_kernel))
    2.12 +		return -ENODEV;
    2.13 +
    2.14 +	/*
    2.15  	 * Domain0 doesn't have a store_evtchn or store_mfn yet.
    2.16  	 */
    2.17  	dom0 = (xen_start_info->store_evtchn == 0);