ok, will fix these

On 11/12/2015 04:53 AM, Alex Williamson wrote:
On Wed, 2015-11-11 at 18:34 +0800, Cao jin wrote:
From: Chen Fan <chen.fan.f...@cn.fujitsu.com>


+        error_report("vfio: Cannot get hot reset info");


This needs a more useful error message:

-        error_report("vfio: Cannot get hot reset info");
+        error_report("vfio: Cannot enable AER for device %s, "
+                     "device does not support hot reset." vdev->vbasedev.name);

+        goto out;
+    }
+

+    if (find.found) {
+        error_report("vfio: Cannot enable AER for device %s, "
+                     "the affected device %s have not a reset mechanism.",

s/have not/does not have/

+                     vdev->vbasedev.name, find.pdev->name);
+        ret = -1;
+        goto out;
+    }
+
+    ret = 0;
+out:
+    g_free(info);
+    return ret;
+}
+
+static int vfio_check_devices_host_bus_reset(void)
+{
+    VFIOGroup *group;
+    VFIODevice *vbasedev;
+    VFIOPCIDevice *vdev;
+
+    /* Check All vfio-pci devices if have bus reset capability */
+    QLIST_FOREACH(group, &vfio_group_list, next) {
+        QLIST_FOREACH(vbasedev, &group->device_list, next) {

Missing a test for vfio-pci device:

+            if (vbasedev_iter->type != VFIO_DEVICE_TYPE_PCI) {
+                continue;
+            }



Thanks,
Alex

.


--
Yours Sincerely,

Cao Jin

Reply via email to