WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Disable xen bus and grant tables when supervisor_mode_ke

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Disable xen bus and grant tables when supervisor_mode_kernel is enabled.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 31 Mar 2006 11:22:08 +0000
Delivery-date: Fri, 31 Mar 2006 11:24:11 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Disable xen bus and grant tables when supervisor_mode_kernel is enabled., Xen patchbot -unstable <=