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

[Xen-devel] VT-d: clean up map/unmap log messages



- printing file name and line number here is pointless
- they are guest related, so should get their log level filter
  accordingly
- include segment numbers and canonicalize number widths

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1289,11 +1289,11 @@ int domain_context_mapping_one(
         {
             if ( pdev->domain != domain )
             {
-                dprintk(XENLOG_INFO VTDPREFIX, "d%d: bdf = %x:%x.%x owned by 
d%d!",
-                        domain->domain_id, 
-                        bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
-                        (pdev->domain)
-                        ? pdev->domain->domain_id : -1);
+                printk(XENLOG_G_INFO VTDPREFIX
+                       "d%d: %04x:%02x:%02x.%u owned by d%d!",
+                       domain->domain_id,
+                       seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
+                       pdev->domain ? pdev->domain->domain_id : -1);
                 res = -EINVAL;
             }
         }
@@ -1304,17 +1304,19 @@ int domain_context_mapping_one(
             
             if ( cdomain < 0 )
             {
-                dprintk(VTDPREFIX, "d%d: bdf = %x:%x.%x mapped, but can't find 
owner!\n",
-                        domain->domain_id, 
-                        bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
+                printk(XENLOG_G_WARNING VTDPREFIX
+                       "d%d: %04x:%02x:%02x.%u mapped, but can't find 
owner!\n",
+                       domain->domain_id,
+                       seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
                 res = -EINVAL;
             }
             else if ( cdomain != domain->domain_id )
             {
-                dprintk(XENLOG_INFO VTDPREFIX, "d%d: bdf = %x:%x.%x already 
mapped to d%d!",
-                        domain->domain_id, 
-                        bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
-                        cdomain);
+                printk(XENLOG_G_INFO VTDPREFIX
+                       "d%d: %04x:%02x:%02x.%u already mapped to d%d!",
+                       domain->domain_id,
+                       seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
+                       cdomain);
                 res = -EINVAL;
             }
         }



Attachment: VT-d-map-messages.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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