Skip to contentSkip to conversation

xen/pciback: Don't print scary messages when unsupported by hypervisor.

PATCH Applied Konrad Rzeszutek Wilk 2 participants 2 messages Feb 27, 2015 – Mar 2, 2015 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/pciback: Don't print scary messages when unsupported by hypervisor.

We print at the warninig level messages such as:
pciback 0000:90:00.5: MSI-X preparation failed (-38)

which is due to the hypervisor not supporting this sub-hypercall (which was added in Xen 4.3).

Instead of having scary messages all the time - only have it when the hypercall is actually supported.

---
 drivers/xen/xen-pciback/pci_stub.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/xen/xen-pciback/pci_stub.c +2 -2
index 7acc796..ddc5500 100644
@@ -115,7 +115,7 @@ static void pcistub_device_release(struct kref *kref)
 		int err = HYPERVISOR_physdev_op(PHYSDEVOP_release_msix,
 						&ppdev);
 
-		if (err)
+		if (err && err != -ENOSYS)
 			dev_warn(&dev->dev, "MSI-X release failed (%d)\n",
 				 err);
 	}
@@ -376,7 +376,7 @@ static int __devinit pcistub_init_device(struct pci_dev *dev)
 		};
 
 		err = HYPERVISOR_physdev_op(PHYSDEVOP_prepare_msix, &ppdev);
-		if (err)
+		if (err && err != -ENOSYS)
 			dev_err(&dev->dev, "MSI-X preparation failed (%d)\n",
 				err);
 	}
Signature · 1 line
2.1.0
Applied
#1 lore raw
Quoted 8 lines · Konrad Rzeszutek Wilk

We print at the warninig level messages such as:
pciback 0000:90:00.5: MSI-X preparation failed (-38)

which is due to the hypervisor not supporting this sub-hypercall (which was added in Xen 4.3).

Instead of having scary messages all the time - only have it when the hypercall is actually supported.

Applied to devel/for-linus-4.1, thanks.

David