ia64/xen-unstable

changeset 10916:ab86a6f3b5ee

[PCI] Transparent virtualization for pcifront and pciback.
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author kfraser@localhost.localdomain
date Wed Aug 02 15:07:21 2006 +0100 (2006-08-02)
parents 08415dfc5918
children 7e7552112954
files linux-2.6-xen-sparse/drivers/xen/pciback/xenbus.c linux-2.6-xen-sparse/drivers/xen/pcifront/xenbus.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/pciback/xenbus.c	Wed Aug 02 15:06:29 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/pciback/xenbus.c	Wed Aug 02 15:07:21 2006 +0100
     1.3 @@ -445,6 +445,9 @@ static struct xenbus_driver xenbus_pciba
     1.4  
     1.5  int __init pciback_xenbus_register(void)
     1.6  {
     1.7 +	if (!is_running_on_xen())
     1.8 +		return -ENODEV;
     1.9 +
    1.10  	return xenbus_register_backend(&xenbus_pciback_driver);
    1.11  }
    1.12  
     2.1 --- a/linux-2.6-xen-sparse/drivers/xen/pcifront/xenbus.c	Wed Aug 02 15:06:29 2006 +0100
     2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/pcifront/xenbus.c	Wed Aug 02 15:07:21 2006 +0100
     2.3 @@ -284,11 +284,10 @@ static struct xenbus_driver xenbus_pcifr
     2.4  
     2.5  static int __init pcifront_init(void)
     2.6  {
     2.7 -	int err = 0;
     2.8 +	if (!is_running_on_xen())
     2.9 +		return -ENODEV;
    2.10  
    2.11 -	err = xenbus_register_frontend(&xenbus_pcifront_driver);
    2.12 -
    2.13 -	return err;
    2.14 +	return xenbus_register_frontend(&xenbus_pcifront_driver);
    2.15  }
    2.16  
    2.17  /* Initialize after the Xen PCI Frontend Stub is initialized */