From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwqU5-00084K-E4 for qemu-devel@nongnu.org; Thu, 12 Nov 2015 06:56:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZwqU0-0002PJ-LK for qemu-devel@nongnu.org; Thu, 12 Nov 2015 06:56:09 -0500 Received: from [59.151.112.132] (port=19968 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwqTy-0002Nm-Cn for qemu-devel@nongnu.org; Thu, 12 Nov 2015 06:56:04 -0500 References: <8b9ac059ab8c4109bdc18a80f6729202782dbe1f.1447231392.git.chen.fan.fnst@cn.fujitsu.com> <1447275232.3946.21.camel@redhat.com> From: Cao jin Message-ID: <56447E6D.3000701@cn.fujitsu.com> Date: Thu, 12 Nov 2015 19:56:29 +0800 MIME-Version: 1.0 In-Reply-To: <1447275232.3946.21.camel@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v13 08/13] vfio: add check host bus reset is support or not List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson Cc: Chen Fan , qemu-devel@nongnu.org, mst@redhat.com 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 >> >> + 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