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] [linux-2.6.18-xen] pciback: Make PV PCI hotplug work wit

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] pciback: Make PV PCI hotplug work with CONFIG_XEN_PCIDEV_BACKEND_PASS
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 26 Mar 2008 13:10:08 -0700
Delivery-date: Wed, 26 Mar 2008 13:10:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1206529688 0
# Node ID 542209a3e7e967430c89c99434d9a230420daad5
# Parent  1327b9dcc63a9855b998fdc21269d4c9eeb557a3
pciback: Make PV PCI hotplug work with CONFIG_XEN_PCIDEV_BACKEND_PASS

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>
---
 drivers/xen/pciback/passthrough.c |   10 ++++++++--
 drivers/xen/pciback/xenbus.c      |   20 ++++++++++++--------
 2 files changed, 20 insertions(+), 10 deletions(-)

diff -r 1327b9dcc63a -r 542209a3e7e9 drivers/xen/pciback/passthrough.c
--- a/drivers/xen/pciback/passthrough.c Wed Mar 26 09:07:52 2008 +0000
+++ b/drivers/xen/pciback/passthrough.c Wed Mar 26 11:08:08 2008 +0000
@@ -47,6 +47,8 @@ int pciback_add_pci_dev(struct pciback_d
        struct passthrough_dev_data *dev_data = pdev->pci_dev_data;
        struct pci_dev_entry *dev_entry;
        unsigned long flags;
+       unsigned int domain, bus, devfn;
+       int err;
 
        dev_entry = kmalloc(sizeof(*dev_entry), GFP_KERNEL);
        if (!dev_entry)
@@ -57,9 +59,13 @@ int pciback_add_pci_dev(struct pciback_d
        list_add_tail(&dev_entry->list, &dev_data->dev_list);
        spin_unlock_irqrestore(&dev_data->lock, flags);
 
-       /* TODO: Publish virtual domain:bus:slot.func here. */
+       /* Publish this device. */
+       domain = (unsigned int)pci_domain_nr(dev->bus);
+       bus = (unsigned int)dev->bus->number;
+       devfn = dev->devfn;
+       err = publish_cb(pdev, domain, bus, devfn, devid);
 
-       return 0;
+       return err;
 }
 
 void pciback_release_pci_dev(struct pciback_device *pdev, struct pci_dev *dev)
diff -r 1327b9dcc63a -r 542209a3e7e9 drivers/xen/pciback/xenbus.c
--- a/drivers/xen/pciback/xenbus.c      Wed Mar 26 09:07:52 2008 +0000
+++ b/drivers/xen/pciback/xenbus.c      Wed Mar 26 11:08:08 2008 +0000
@@ -348,7 +348,6 @@ static int pciback_reconfigure(struct pc
                        substate = XenbusStateUnknown;
 
                switch (substate) {
-               /* case XenbusStateUnknown: */
                case XenbusStateInitialising:
                        dev_dbg(&pdev->xdev->dev, "Attaching dev-%d ...\n", i);
 
@@ -382,10 +381,14 @@ static int pciback_reconfigure(struct pc
                        if (err)
                                goto out;
 
-                       /* TODO: if we are to support multiple pci roots
-                        * (CONFIG_XEN_PCIDEV_BACKEND_PASS), publish newly
-                        * added root here.
-                        */
+                       /* Publish pci roots. */
+                       err = pciback_publish_pci_roots(pdev, 
pciback_publish_pci_root);
+                       if (err) {
+                               xenbus_dev_fatal(pdev->xdev, err,
+                                                "Error while publish PCI root"
+                                                "buses for frontend");
+                               goto out;
+                       }
 
                        err = xenbus_printf(XBT_NIL, pdev->xdev->nodename,
                                            state_str, "%d",
@@ -431,10 +434,11 @@ static int pciback_reconfigure(struct pc
                        if(err)
                                goto out;
 
-                       /* TODO: if we are to support multiple pci roots
-                        * (CONFIG_XEN_PCIDEV_BACKEND_PASS), remove unnecessary
-                        * root here.
+                       /* TODO: If at some point we implement support for pci
+                        * root hot-remove on pcifront side, we'll need to
+                        * remove unnecessary xenstore nodes of pci roots here.
                         */
+
                        break;
 
                default:

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] pciback: Make PV PCI hotplug work with CONFIG_XEN_PCIDEV_BACKEND_PASS, Xen patchbot-linux-2.6.18-xen <=