Skip to contentSkip to conversation

vtd/iommu: correct loglevel when check group divices

PATCH In review Tiejun Chen 3 participants 3 messages Sep 16, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 vtd/iommu: correct loglevel when check group divices

Since commit 3848058e7dd6 (vtd/iommu: permit group devices to passthrough in relaxed mode) is introduced, we always print message as XENLOG_G_WARNING but its not correct in the case of strict mode. So here is making this message depending on the specific mode.

CC Yang Zhang <[email protected]>
CC Kevin Tian <[email protected]>
CC Jan Beulich <[email protected]>
CC Wei Liu <[email protected]>

---
v2:

* Correct wrong place to loglevel.

 xen/drivers/passthrough/vtd/iommu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
xen/drivers/passthrough/vtd/iommu.c +2 -1
index 7b45bff..b67b624 100644
@@ -2314,9 +2314,10 @@ static int intel_iommu_assign_device(
         {
             bool_t relaxed = !!(flag & XEN_DOMCTL_DEV_RDM_RELAXED);
 
-            printk(XENLOG_G_WARNING VTDPREFIX
+            printk(XENLOG_GUEST "%s" VTDPREFIX
                    " It's %s to assign %04x:%02x:%02x.%u"
                    " with shared RMRR at %"PRIx64" for Dom%d.\n",
+                   relaxed ? XENLOG_WARNING : XENLOG_ERR,
                    relaxed ? "risky" : "disallowed",
                    seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
                    rmrr->base_address, d->domain_id);
Signature · 1 line
1.9.1
Acked-by on v2 1/1
#1 lore raw
Quoted 9 lines

From: Chen, Tiejun
Sent: Wednesday, September 16, 2015 3:39 PM

Since commit 3848058e7dd6 (vtd/iommu: permit group devices to passthrough in relaxed mode) is introduced, we always print message as XENLOG_G_WARNING but its not correct in the case of strict mode. So here is making this message depending on the specific mode.

Quoted 5 lines
CC Yang Zhang <[email protected]>
CC Kevin Tian <[email protected]>
CC Jan Beulich <[email protected]>
CC Wei Liu <[email protected]>
Quoted 27 lines

---
v2:

* Correct wrong place to loglevel.

 xen/drivers/passthrough/vtd/iommu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
xen/drivers/passthrough/vtd/iommu.c +2 -2
index 7b45bff..b67b624 100644
@@ -2314,9 +2314,10 @@ static int intel_iommu_assign_device(
         {
             bool_t relaxed = !!(flag & XEN_DOMCTL_DEV_RDM_RELAXED);
 
-            printk(XENLOG_G_WARNING VTDPREFIX
+            printk(XENLOG_GUEST "%s" VTDPREFIX
                    " It's %s to assign %04x:%02x:%02x.%u"
                    " with shared RMRR at %"PRIx64" for Dom%d.\n",
+                   relaxed ? XENLOG_WARNING : XENLOG_ERR,
                    relaxed ? "risky" : "disallowed",
                    seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
                    rmrr->base_address, d->domain_id);
--

1.9.1

#2 lore raw
In reply to Tiejun Chen
Quoted 11 lines · Tiejun Chen

Since commit 3848058e7dd6 (vtd/iommu: permit group devices to passthrough in relaxed mode) is introduced, we always print message as XENLOG_G_WARNING but its not correct in the case of strict mode. So here is making this message depending on the specific mode.

CC Yang Zhang <[email protected]>
CC Kevin Tian <[email protected]>
CC Jan Beulich <[email protected]>
CC Wei Liu <[email protected]>

Jan, I see you already applied this to staging, feel free to apply this for 4.6 as well.

Wei.