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] Remove useless SIF_XXX_BE_DOMAIN driver flags.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Remove useless SIF_XXX_BE_DOMAIN driver flags.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 19 Oct 2005 12:08:13 +0000
Delivery-date: Wed, 19 Oct 2005 12:06:04 +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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 895149d240480ca9e4852c9d5bf57627b4fe3b40
# Parent  ba9706473941520247153e7e31d89899285d09ce
Remove useless SIF_XXX_BE_DOMAIN driver flags.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r ba9706473941 -r 895149d24048 
linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c        Mon Oct 17 
14:15:17 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c        Mon Oct 17 
14:54:28 2005
@@ -494,10 +494,6 @@
        int i;
        struct page *page;
 
-       if (!(xen_start_info->flags & SIF_INITDOMAIN) &&
-           !(xen_start_info->flags & SIF_BLK_BE_DOMAIN))
-               return 0;
-
        blkif_interface_init();
 
        page = balloon_alloc_empty_page_range(MMAP_PAGES);
diff -r ba9706473941 -r 895149d24048 
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Mon Oct 17 
14:15:17 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Mon Oct 17 
14:54:28 2005
@@ -725,21 +725,9 @@
        .suspend = blkfront_suspend,
 };
 
-static void __init init_blk_xenbus(void)
+static int __init xlblk_init(void)
 {
        xenbus_register_driver(&blkfront);
-}
-
-static int __init xlblk_init(void)
-{
-       if ((xen_start_info->flags & SIF_INITDOMAIN) ||
-           (xen_start_info->flags & SIF_BLK_BE_DOMAIN) )
-               return 0;
-
-       IPRINTK("Initialising virtual block device driver\n");
-
-       init_blk_xenbus();
-
        return 0;
 }
 
diff -r ba9706473941 -r 895149d24048 
linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c
--- a/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c  Mon Oct 17 14:15:17 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c  Mon Oct 17 14:54:28 2005
@@ -861,11 +861,7 @@
 {
        int i, j, err;
        struct page *page;
-/*
-  if ( !(xen_start_info->flags & SIF_INITDOMAIN) &&
-  !(xen_start_info->flags & SIF_BLK_BE_DOMAIN) )
-  return 0;
-*/
+
        blkif_interface_init();
 
        page = balloon_alloc_empty_page_range(MMAP_PAGES);
diff -r ba9706473941 -r 895149d24048 
linux-2.6-xen-sparse/drivers/xen/netback/netback.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Mon Oct 17 
14:15:17 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Mon Oct 17 
14:54:28 2005
@@ -781,12 +781,6 @@
        int i;
        struct page *page;
 
-       if (!(xen_start_info->flags & SIF_NET_BE_DOMAIN) &&
-           !(xen_start_info->flags & SIF_INITDOMAIN))
-               return 0;
-
-       IPRINTK("Initialising Xen netif backend.\n");
-
        /* We can increase reservation by this much in net_rx_action(). */
        balloon_update_driver_allowance(NETIF_RX_RING_SIZE);
 
diff -r ba9706473941 -r 895149d24048 
linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c
--- a/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c        Mon Oct 17 
14:15:17 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c        Mon Oct 17 
14:54:28 2005
@@ -1076,11 +1076,6 @@
 tpmback_init(void)
 {
        int rc;
-       if (!(xen_start_info->flags & SIF_TPM_BE_DOMAIN) &&
-           !(xen_start_info->flags & SIF_INITDOMAIN)) {
-               printk(KERN_ALERT "Neither TPM-BE Domain nor INIT domain!\n");
-               return 0;
-       }
 
        if ((rc = misc_register(&ibmvtpms_miscdevice)) != 0) {
                printk(KERN_ALERT "Could not register misc device for TPM 
BE.\n");
diff -r ba9706473941 -r 895149d24048 
linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypervisor.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypervisor.h        Mon Oct 
17 14:15:17 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypervisor.h        Mon Oct 
17 14:54:28 2005
@@ -49,6 +49,8 @@
 #  define pud_t pgd_t
 # endif
 #endif
+
+extern shared_info_t *HYPERVISOR_shared_info;
 
 /* arch/xen/i386/kernel/setup.c */
 extern start_info_t *xen_start_info;
diff -r ba9706473941 -r 895149d24048 
linux-2.6-xen-sparse/include/asm-xen/asm-ia64/hypervisor.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-ia64/hypervisor.h        Mon Oct 
17 14:15:17 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-ia64/hypervisor.h        Mon Oct 
17 14:54:28 2005
@@ -39,6 +39,7 @@
 #include <asm/ptrace.h>
 #include <asm/page.h>
 
+extern shared_info_t *HYPERVISOR_shared_info;
 extern start_info_t *xen_start_info;
 
 void force_evtchn_callback(void);
diff -r ba9706473941 -r 895149d24048 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Mon Oct 17 14:15:17 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py   Mon Oct 17 14:54:28 2005
@@ -81,18 +81,7 @@
 STATE_DOM_OK       = 1
 STATE_DOM_SHUTDOWN = 2
 
-"""Flag for a block device backend domain."""
-SIF_BLK_BE_DOMAIN = (1<<4)
-
-"""Flag for a net device backend domain."""
-SIF_NET_BE_DOMAIN = (1<<5)
-
-"""Flag for a TPM device backend domain."""
-SIF_TPM_BE_DOMAIN = (1<<7)
-
-
 SHUTDOWN_TIMEOUT = 30
-
 
 DOMROOT = '/local/domain/'
 VMROOT  = '/vm/'
@@ -512,11 +501,6 @@
             if self.info['maxmem_KiB'] > self.info['memory_KiB']:
                 self.info['maxmem_KiB'] = self.info['memory_KiB']
 
-            # Validate the given backend names.
-            for s in self.info['backend']:
-                if s not in backendFlags:
-                    raise VmError('Invalid backend type: %s' % s)
-
             for (n, c) in self.info['device']:
                 if not n or not c or n not in controllerClasses:
                     raise VmError('invalid device (%s, %s)' %
@@ -678,8 +662,7 @@
 
 
     def getBackendFlags(self):
-        return reduce(lambda x, y: x | backendFlags[y],
-                      self.info['backend'], 0)
+        return 0
 
 
     def refreshShutdown(self, xeninfo = None):
@@ -1409,25 +1392,16 @@
 implements the device control specific to that device-class."""
 controllerClasses = {}
 
-
-"""A map of backend names and the corresponding flag."""
-backendFlags = {}
-
-
-def addControllerClass(device_class, backend_name, backend_flag, cls):
+def addControllerClass(device_class, backend_name, cls):
     """Register a subclass of DevController to handle the named device-class.
-
-    @param backend_flag One of the SIF_XYZ_BE_DOMAIN constants, or None if
-    no flag is to be set.
     """
     cls.deviceClass = device_class
-    backendFlags[backend_name] = backend_flag
     controllerClasses[device_class] = cls
 
 
 from xen.xend.server import blkif, netif, tpmif, pciif, usbif
-addControllerClass('vbd',  'blkif', SIF_BLK_BE_DOMAIN, blkif.BlkifController)
-addControllerClass('vif',  'netif', SIF_NET_BE_DOMAIN, netif.NetifController)
-addControllerClass('vtpm', 'tpmif', SIF_TPM_BE_DOMAIN, tpmif.TPMifController)
-addControllerClass('pci',  'pciif', None,              pciif.PciController)
-addControllerClass('usb',  'usbif', None,              usbif.UsbifController)
+addControllerClass('vbd',  'blkif', blkif.BlkifController)
+addControllerClass('vif',  'netif', netif.NetifController)
+addControllerClass('vtpm', 'tpmif', tpmif.TPMifController)
+addControllerClass('pci',  'pciif', pciif.PciController)
+addControllerClass('usb',  'usbif', usbif.UsbifController)
diff -r ba9706473941 -r 895149d24048 xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Mon Oct 17 14:15:17 2005
+++ b/xen/arch/ia64/xen/domain.c        Mon Oct 17 14:54:28 2005
@@ -351,7 +351,7 @@
                }
                VCPU(v, banknum) = 1;
                VCPU(v, metaphysical_mode) = 1;
-               d->shared_info->arch.flags = (d == dom0) ? 
(SIF_INITDOMAIN|SIF_PRIVILEGED|SIF_BLK_BE_DOMAIN|SIF_NET_BE_DOMAIN|SIF_USB_BE_DOMAIN)
 : 0;
+               d->shared_info->arch.flags = (d == dom0) ? 
(SIF_INITDOMAIN|SIF_PRIVILEGED) : 0;
        }
 }
 
diff -r ba9706473941 -r 895149d24048 xen/include/public/xen.h
--- a/xen/include/public/xen.h  Mon Oct 17 14:15:17 2005
+++ b/xen/include/public/xen.h  Mon Oct 17 14:54:28 2005
@@ -430,12 +430,6 @@
 /* These flags are passed in the 'flags' field of start_info_t. */
 #define SIF_PRIVILEGED    (1<<0)  /* Is the domain privileged? */
 #define SIF_INITDOMAIN    (1<<1)  /* Is this the initial control domain? */
-#define SIF_BLK_BE_DOMAIN (1<<4)  /* Is this a block backend domain? */
-#define SIF_NET_BE_DOMAIN (1<<5)  /* Is this a net backend domain? */
-#define SIF_USB_BE_DOMAIN (1<<6)  /* Is this a usb backend domain? */
-#define SIF_TPM_BE_DOMAIN (1<<7)  /* Is this a TPM backend domain? */
-/* For use in guest OSes. */
-extern shared_info_t *HYPERVISOR_shared_info;
 
 typedef uint64_t cpumap_t;
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Remove useless SIF_XXX_BE_DOMAIN driver flags., Xen patchbot -unstable <=