[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [PCI] Transparent virtualization for pcifront and pciback.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID ab86a6f3b5ee3be0550194362f64c3aebfecefbf
# Parent  08415dfc5918b43c79177237362237b2e3b6bca3
[PCI] Transparent virtualization for pcifront and pciback.
Signed-off-by: Tristan Gingold <tristan.gingold@xxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/pciback/xenbus.c  |    3 +++
 linux-2.6-xen-sparse/drivers/xen/pcifront/xenbus.c |    9 ++++-----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff -r 08415dfc5918 -r ab86a6f3b5ee 
linux-2.6-xen-sparse/drivers/xen/pciback/xenbus.c
--- a/linux-2.6-xen-sparse/drivers/xen/pciback/xenbus.c Wed Aug 02 15:06:29 
2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/pciback/xenbus.c Wed Aug 02 15:07:21 
2006 +0100
@@ -445,6 +445,9 @@ static struct xenbus_driver xenbus_pciba
 
 int __init pciback_xenbus_register(void)
 {
+       if (!is_running_on_xen())
+               return -ENODEV;
+
        return xenbus_register_backend(&xenbus_pciback_driver);
 }
 
diff -r 08415dfc5918 -r ab86a6f3b5ee 
linux-2.6-xen-sparse/drivers/xen/pcifront/xenbus.c
--- a/linux-2.6-xen-sparse/drivers/xen/pcifront/xenbus.c        Wed Aug 02 
15:06:29 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/pcifront/xenbus.c        Wed Aug 02 
15:07:21 2006 +0100
@@ -284,11 +284,10 @@ static struct xenbus_driver xenbus_pcifr
 
 static int __init pcifront_init(void)
 {
-       int err = 0;
-
-       err = xenbus_register_frontend(&xenbus_pcifront_driver);
-
-       return err;
+       if (!is_running_on_xen())
+               return -ENODEV;
+
+       return xenbus_register_frontend(&xenbus_pcifront_driver);
 }
 
 /* Initialize after the Xen PCI Frontend Stub is initialized */

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.