xen/pciback: Expand the warning message to include domain id.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 4 Jan 2012 19:16:45 +0000 (14:16 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 9 Jan 2012 15:24:11 +0000 (10:24 -0500)
When a PCI device is transferred to another domain and it is still
in usage (from the internal perspective), mention which other
domain is using it to aid in debugging.

[v2: Truncate the verbose message per Jan Beulich suggestion]
[v3: Suggestions from Ian Campbell on the wording]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
drivers/xen/xen-pciback/xenbus.c

index 87c5dc3368d0e2d111f8c3773a6c784f386acca5..8e1c44d8ab469d2e28d47a838cb003fafb79949c 100644 (file)
@@ -243,8 +243,8 @@ static int xen_pcibk_export_device(struct xen_pcibk_device *pdev,
        dev_dbg(&dev->dev, "registering for %d\n", pdev->xdev->otherend_id);
        if (xen_register_device_domain_owner(dev,
                                             pdev->xdev->otherend_id) != 0) {
-               dev_err(&dev->dev, "device has been assigned to another " \
-                       "domain! Over-writting the ownership, but beware.\n");
+               dev_err(&dev->dev, "Stealing ownership from dom%d.\n",
+                       xen_find_device_domain_owner(dev));
                xen_unregister_device_domain_owner(dev);
                xen_register_device_domain_owner(dev, pdev->xdev->otherend_id);
        }