qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v13 08/13] vfio: add check host bus reset is sup


From: Cao jin
Subject: Re: [Qemu-devel] [PATCH v13 08/13] vfio: add check host bus reset is support or not
Date: Thu, 12 Nov 2015 19:56:29 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

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 <address@hidden>


+        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

[Prev in Thread] Current Thread [Next in Thread]