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-devel

[Xen-devel] [PATCH 11/13] pciback: Add check to load only under privilig

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 11/13] pciback: Add check to load only under priviliged domain.
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Tue, 13 Oct 2009 17:22:30 -0400
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Tue, 13 Oct 2009 14:32:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1255468952-27052-11-git-send-email-konrad.wilk@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1255468952-27052-1-git-send-email-konrad.wilk@xxxxxxxxxx> <1255468952-27052-2-git-send-email-konrad.wilk@xxxxxxxxxx> <1255468952-27052-3-git-send-email-konrad.wilk@xxxxxxxxxx> <1255468952-27052-4-git-send-email-konrad.wilk@xxxxxxxxxx> <1255468952-27052-5-git-send-email-konrad.wilk@xxxxxxxxxx> <1255468952-27052-6-git-send-email-konrad.wilk@xxxxxxxxxx> <1255468952-27052-7-git-send-email-konrad.wilk@xxxxxxxxxx> <1255468952-27052-8-git-send-email-konrad.wilk@xxxxxxxxxx> <1255468952-27052-9-git-send-email-konrad.wilk@xxxxxxxxxx> <1255468952-27052-10-git-send-email-konrad.wilk@xxxxxxxxxx> <1255468952-27052-11-git-send-email-konrad.wilk@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
 drivers/xen/pciback/pci_stub.c |    3 +++
 drivers/xen/pciback/xenbus.c   |    2 --
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/xen/pciback/pci_stub.c b/drivers/xen/pciback/pci_stub.c
index 036d7bb..5ea594b 100644
--- a/drivers/xen/pciback/pci_stub.c
+++ b/drivers/xen/pciback/pci_stub.c
@@ -1268,6 +1268,9 @@ static int __init pciback_init(void)
 {
        int err;
 
+       if (!xen_initial_domain())
+               return -ENODEV;
+
        err = pciback_config_init();
        if (err)
                return err;
diff --git a/drivers/xen/pciback/xenbus.c b/drivers/xen/pciback/xenbus.c
index 5be1350..a85c413 100644
--- a/drivers/xen/pciback/xenbus.c
+++ b/drivers/xen/pciback/xenbus.c
@@ -693,8 +693,6 @@ static struct xenbus_driver xenbus_pciback_driver = {
 
 int __init pciback_xenbus_register(void)
 {
-       if (!is_running_on_xen())
-               return -ENODEV;
        pciback_wq = create_workqueue("pciback_workqueue");
        if (!pciback_wq) {
                printk(KERN_ERR "pciback_xenbus_register: create"
-- 
1.6.2.5


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

<Prev in Thread] Current Thread [Next in Thread>