ia64/xen-unstable

changeset 7413:895149d24048

Remove useless SIF_XXX_BE_DOMAIN driver flags.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Oct 17 15:54:28 2005 +0100 (2005-10-17)
parents ba9706473941
children f726c39670d9
files linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c linux-2.6-xen-sparse/drivers/xen/netback/netback.c linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypervisor.h linux-2.6-xen-sparse/include/asm-xen/asm-ia64/hypervisor.h tools/python/xen/xend/XendDomainInfo.py xen/arch/ia64/xen/domain.c xen/include/public/xen.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c	Mon Oct 17 15:15:17 2005 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c	Mon Oct 17 15:54:28 2005 +0100
     1.3 @@ -494,10 +494,6 @@ static int __init blkif_init(void)
     1.4  	int i;
     1.5  	struct page *page;
     1.6  
     1.7 -	if (!(xen_start_info->flags & SIF_INITDOMAIN) &&
     1.8 -	    !(xen_start_info->flags & SIF_BLK_BE_DOMAIN))
     1.9 -		return 0;
    1.10 -
    1.11  	blkif_interface_init();
    1.12  
    1.13  	page = balloon_alloc_empty_page_range(MMAP_PAGES);
     2.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Mon Oct 17 15:15:17 2005 +0100
     2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Mon Oct 17 15:54:28 2005 +0100
     2.3 @@ -725,21 +725,9 @@ static struct xenbus_driver blkfront = {
     2.4  	.suspend = blkfront_suspend,
     2.5  };
     2.6  
     2.7 -static void __init init_blk_xenbus(void)
     2.8 -{
     2.9 -	xenbus_register_driver(&blkfront);
    2.10 -}
    2.11 -
    2.12  static int __init xlblk_init(void)
    2.13  {
    2.14 -	if ((xen_start_info->flags & SIF_INITDOMAIN) ||
    2.15 -	    (xen_start_info->flags & SIF_BLK_BE_DOMAIN) )
    2.16 -		return 0;
    2.17 -
    2.18 -	IPRINTK("Initialising virtual block device driver\n");
    2.19 -
    2.20 -	init_blk_xenbus();
    2.21 -
    2.22 +	xenbus_register_driver(&blkfront);
    2.23  	return 0;
    2.24  }
    2.25  
     3.1 --- a/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c	Mon Oct 17 15:15:17 2005 +0100
     3.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c	Mon Oct 17 15:54:28 2005 +0100
     3.3 @@ -861,11 +861,7 @@ static int __init blkif_init(void)
     3.4  {
     3.5  	int i, j, err;
     3.6  	struct page *page;
     3.7 -/*
     3.8 -  if ( !(xen_start_info->flags & SIF_INITDOMAIN) &&
     3.9 -  !(xen_start_info->flags & SIF_BLK_BE_DOMAIN) )
    3.10 -  return 0;
    3.11 -*/
    3.12 +
    3.13  	blkif_interface_init();
    3.14  
    3.15  	page = balloon_alloc_empty_page_range(MMAP_PAGES);
     4.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c	Mon Oct 17 15:15:17 2005 +0100
     4.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c	Mon Oct 17 15:54:28 2005 +0100
     4.3 @@ -781,12 +781,6 @@ static int __init netback_init(void)
     4.4  	int i;
     4.5  	struct page *page;
     4.6  
     4.7 -	if (!(xen_start_info->flags & SIF_NET_BE_DOMAIN) &&
     4.8 -	    !(xen_start_info->flags & SIF_INITDOMAIN))
     4.9 -		return 0;
    4.10 -
    4.11 -	IPRINTK("Initialising Xen netif backend.\n");
    4.12 -
    4.13  	/* We can increase reservation by this much in net_rx_action(). */
    4.14  	balloon_update_driver_allowance(NETIF_RX_RING_SIZE);
    4.15  
     5.1 --- a/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c	Mon Oct 17 15:15:17 2005 +0100
     5.2 +++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c	Mon Oct 17 15:54:28 2005 +0100
     5.3 @@ -1076,11 +1076,6 @@ static int __init
     5.4  tpmback_init(void)
     5.5  {
     5.6  	int rc;
     5.7 -	if (!(xen_start_info->flags & SIF_TPM_BE_DOMAIN) &&
     5.8 -	    !(xen_start_info->flags & SIF_INITDOMAIN)) {
     5.9 -	    	printk(KERN_ALERT "Neither TPM-BE Domain nor INIT domain!\n");
    5.10 -		return 0;
    5.11 -	}
    5.12  
    5.13  	if ((rc = misc_register(&ibmvtpms_miscdevice)) != 0) {
    5.14  		printk(KERN_ALERT "Could not register misc device for TPM BE.\n");
     6.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypervisor.h	Mon Oct 17 15:15:17 2005 +0100
     6.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypervisor.h	Mon Oct 17 15:54:28 2005 +0100
     6.3 @@ -50,6 +50,8 @@
     6.4  # endif
     6.5  #endif
     6.6  
     6.7 +extern shared_info_t *HYPERVISOR_shared_info;
     6.8 +
     6.9  /* arch/xen/i386/kernel/setup.c */
    6.10  extern start_info_t *xen_start_info;
    6.11  
     7.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-ia64/hypervisor.h	Mon Oct 17 15:15:17 2005 +0100
     7.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-ia64/hypervisor.h	Mon Oct 17 15:54:28 2005 +0100
     7.3 @@ -39,6 +39,7 @@
     7.4  #include <asm/ptrace.h>
     7.5  #include <asm/page.h>
     7.6  
     7.7 +extern shared_info_t *HYPERVISOR_shared_info;
     7.8  extern start_info_t *xen_start_info;
     7.9  
    7.10  void force_evtchn_callback(void);
     8.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Mon Oct 17 15:15:17 2005 +0100
     8.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Mon Oct 17 15:54:28 2005 +0100
     8.3 @@ -81,19 +81,8 @@ restart_modes = [
     8.4  STATE_DOM_OK       = 1
     8.5  STATE_DOM_SHUTDOWN = 2
     8.6  
     8.7 -"""Flag for a block device backend domain."""
     8.8 -SIF_BLK_BE_DOMAIN = (1<<4)
     8.9 -
    8.10 -"""Flag for a net device backend domain."""
    8.11 -SIF_NET_BE_DOMAIN = (1<<5)
    8.12 -
    8.13 -"""Flag for a TPM device backend domain."""
    8.14 -SIF_TPM_BE_DOMAIN = (1<<7)
    8.15 -
    8.16 -
    8.17  SHUTDOWN_TIMEOUT = 30
    8.18  
    8.19 -
    8.20  DOMROOT = '/local/domain/'
    8.21  VMROOT  = '/vm/'
    8.22  
    8.23 @@ -512,11 +501,6 @@ class XendDomainInfo:
    8.24              if self.info['maxmem_KiB'] > self.info['memory_KiB']:
    8.25                  self.info['maxmem_KiB'] = self.info['memory_KiB']
    8.26  
    8.27 -            # Validate the given backend names.
    8.28 -            for s in self.info['backend']:
    8.29 -                if s not in backendFlags:
    8.30 -                    raise VmError('Invalid backend type: %s' % s)
    8.31 -
    8.32              for (n, c) in self.info['device']:
    8.33                  if not n or not c or n not in controllerClasses:
    8.34                      raise VmError('invalid device (%s, %s)' %
    8.35 @@ -678,8 +662,7 @@ class XendDomainInfo:
    8.36  
    8.37  
    8.38      def getBackendFlags(self):
    8.39 -        return reduce(lambda x, y: x | backendFlags[y],
    8.40 -                      self.info['backend'], 0)
    8.41 +        return 0
    8.42  
    8.43  
    8.44      def refreshShutdown(self, xeninfo = None):
    8.45 @@ -1409,25 +1392,16 @@ class XendDomainInfo:
    8.46  implements the device control specific to that device-class."""
    8.47  controllerClasses = {}
    8.48  
    8.49 -
    8.50 -"""A map of backend names and the corresponding flag."""
    8.51 -backendFlags = {}
    8.52 -
    8.53 -
    8.54 -def addControllerClass(device_class, backend_name, backend_flag, cls):
    8.55 +def addControllerClass(device_class, backend_name, cls):
    8.56      """Register a subclass of DevController to handle the named device-class.
    8.57 -
    8.58 -    @param backend_flag One of the SIF_XYZ_BE_DOMAIN constants, or None if
    8.59 -    no flag is to be set.
    8.60      """
    8.61      cls.deviceClass = device_class
    8.62 -    backendFlags[backend_name] = backend_flag
    8.63      controllerClasses[device_class] = cls
    8.64  
    8.65  
    8.66  from xen.xend.server import blkif, netif, tpmif, pciif, usbif
    8.67 -addControllerClass('vbd',  'blkif', SIF_BLK_BE_DOMAIN, blkif.BlkifController)
    8.68 -addControllerClass('vif',  'netif', SIF_NET_BE_DOMAIN, netif.NetifController)
    8.69 -addControllerClass('vtpm', 'tpmif', SIF_TPM_BE_DOMAIN, tpmif.TPMifController)
    8.70 -addControllerClass('pci',  'pciif', None,              pciif.PciController)
    8.71 -addControllerClass('usb',  'usbif', None,              usbif.UsbifController)
    8.72 +addControllerClass('vbd',  'blkif', blkif.BlkifController)
    8.73 +addControllerClass('vif',  'netif', netif.NetifController)
    8.74 +addControllerClass('vtpm', 'tpmif', tpmif.TPMifController)
    8.75 +addControllerClass('pci',  'pciif', pciif.PciController)
    8.76 +addControllerClass('usb',  'usbif', usbif.UsbifController)
     9.1 --- a/xen/arch/ia64/xen/domain.c	Mon Oct 17 15:15:17 2005 +0100
     9.2 +++ b/xen/arch/ia64/xen/domain.c	Mon Oct 17 15:54:28 2005 +0100
     9.3 @@ -351,7 +351,7 @@ void new_thread(struct vcpu *v,
     9.4  		}
     9.5  		VCPU(v, banknum) = 1;
     9.6  		VCPU(v, metaphysical_mode) = 1;
     9.7 -		d->shared_info->arch.flags = (d == dom0) ? (SIF_INITDOMAIN|SIF_PRIVILEGED|SIF_BLK_BE_DOMAIN|SIF_NET_BE_DOMAIN|SIF_USB_BE_DOMAIN) : 0;
     9.8 +		d->shared_info->arch.flags = (d == dom0) ? (SIF_INITDOMAIN|SIF_PRIVILEGED) : 0;
     9.9  	}
    9.10  }
    9.11  
    10.1 --- a/xen/include/public/xen.h	Mon Oct 17 15:15:17 2005 +0100
    10.2 +++ b/xen/include/public/xen.h	Mon Oct 17 15:54:28 2005 +0100
    10.3 @@ -430,12 +430,6 @@ typedef struct start_info {
    10.4  /* These flags are passed in the 'flags' field of start_info_t. */
    10.5  #define SIF_PRIVILEGED    (1<<0)  /* Is the domain privileged? */
    10.6  #define SIF_INITDOMAIN    (1<<1)  /* Is this the initial control domain? */
    10.7 -#define SIF_BLK_BE_DOMAIN (1<<4)  /* Is this a block backend domain? */
    10.8 -#define SIF_NET_BE_DOMAIN (1<<5)  /* Is this a net backend domain? */
    10.9 -#define SIF_USB_BE_DOMAIN (1<<6)  /* Is this a usb backend domain? */
   10.10 -#define SIF_TPM_BE_DOMAIN (1<<7)  /* Is this a TPM backend domain? */
   10.11 -/* For use in guest OSes. */
   10.12 -extern shared_info_t *HYPERVISOR_shared_info;
   10.13  
   10.14  typedef uint64_t cpumap_t;
   10.15