Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6249460yba; Tue, 14 May 2019 04:32:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqxs2kxxGY6PA/iI+Qyp97KBZfmAYim6kQsz7qfKAM3PAFyZ3G/EXO/wU7iNwP4mcCoIEviQ X-Received: by 2002:a17:902:b492:: with SMTP id y18mr32258737plr.96.1557833523343; Tue, 14 May 2019 04:32:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557833523; cv=none; d=google.com; s=arc-20160816; b=IkYPD91nPd39f6O/sNn/XL3EOhC3tI2hSHY+PBYNeGBUBQ8cqeQIg51mFKb1WPXCyb PR9wa/SmW6uPE7+p05Wqj1PObnOC3kzsssrAxdvcWzJXtCo5lPrEspMtNpatzGQLQXEc 2r2DZvR1ns5eVg4XiOc2jbQ/RHq88Io7Z4jVj0A7xLX6mdI//bAX3/aapgJNs4hG5rH/ uWMnZ0nuIZ0/n9gP/jeeYxUj6Ojl+PWCgsCEK+qPDay8gSBnavr4eFCD3/HcyIQUN1RT omgF567ZINRv9oS8O3IhMhlWR/h1N0IEUHVl1LsgxbTvzKI/nY7VOwSUEvUuGG6/Cehg lIKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=Btx8f3EqWSe86nGXN9iyhWa3UQg+XjuvRo9VQsc5lIE=; b=eW0OOrzBnkZ8npRtcs3xDqaUv9rd5XMo5osUDlOiCGOfFigm4/PwkB9JEIWZtuhSmL DvZblokRR1HaAz/y+KyuJ3jcU+JmfeS9ET3CnWxu7trNb6TLnLgQezY0W3rP76bxa9z5 uqzleGBEL35SrFzCz0UjqP3nK8ikF5vfBNHPE/vW0OBApf/TRAIf6OEXKNk24liy+AqC kHTfSrg1BwtRlx1pozMdD23HE1DkZ7E/wVlTwfaZflOE6bLCa+h/bVNoTO5G34a9l7Ia atVBL9B4GKtrjdqtrWrzlxtBmrQ0A/XQt+wunh7wNj3TX6U+Y/17rC7yUvHrpsS+QJaX 9dFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r71si21652504pfa.183.2019.05.14.04.31.40; Tue, 14 May 2019 04:32:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726370AbfENLaY (ORCPT + 99 others); Tue, 14 May 2019 07:30:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43072 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726265AbfENLaX (ORCPT ); Tue, 14 May 2019 07:30:23 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C265A3082E5A; Tue, 14 May 2019 11:30:22 +0000 (UTC) Received: from gondolin (dhcp-192-222.str.redhat.com [10.33.192.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id 04D9760BCF; Tue, 14 May 2019 11:30:09 +0000 (UTC) Date: Tue, 14 May 2019 13:30:07 +0200 From: Cornelia Huck To: "Dr. David Alan Gilbert" Cc: Yan Zhao , Erik Skultety , "cjia@nvidia.com" , "kvm@vger.kernel.org" , "aik@ozlabs.ru" , "Zhengxiao.zx@alibaba-inc.com" , "shuangtai.tst@alibaba-inc.com" , "qemu-devel@nongnu.org" , "kwankhede@nvidia.com" , "eauger@redhat.com" , "Liu, Yi L" , "Yang, Ziye" , "mlevitsk@redhat.com" , "pasic@linux.ibm.com" , "libvir-list@redhat.com" , "arei.gonglei@huawei.com" , "felipe@nutanix.com" , "Ken.Xue@amd.com" , "Tian, Kevin" , "zhenyuw@linux.intel.com" , "dinechin@redhat.com" , Alex Williamson , "intel-gvt-dev@lists.freedesktop.org" , "Liu, Changpeng" , "berrange@redhat.com" , "linux-kernel@vger.kernel.org" , "Wang, Zhi A" , "jonathan.davies@nutanix.com" , "He, Shaopeng" Subject: Re: [PATCH v2 1/2] vfio/mdev: add version attribute for mdev device Message-ID: <20190514133007.5e1c6c2e.cohuck@redhat.com> In-Reply-To: <20190514110143.GD2753@work-vm> References: <20190510110838.2df4c4d0.cohuck@redhat.com> <20190510093608.GD2854@work-vm> <20190510114838.7e16c3d6.cohuck@redhat.com> <20190513132804.GD11139@beluga.usersys.redhat.com> <20190514061235.GC20407@joy-OptiPlex-7040> <20190514072039.GA2089@beluga.usersys.redhat.com> <20190514073219.GD20407@joy-OptiPlex-7040> <20190514074344.GB2089@beluga.usersys.redhat.com> <20190514074736.GE20407@joy-OptiPlex-7040> <20190514115135.078bbaf7.cohuck@redhat.com> <20190514110143.GD2753@work-vm> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 14 May 2019 11:30:23 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 May 2019 12:01:45 +0100 "Dr. David Alan Gilbert" wrote: > * Cornelia Huck (cohuck@redhat.com) wrote: > > On Tue, 14 May 2019 03:47:36 -0400 > > Yan Zhao wrote: > > > hi Cornelia and Dave, > > > do you also agree on: > > > 1. "not to define the specific errno returned for a specific situation, > > > let the vendor driver decide, userspace simply needs to know that an errno on > > > read indicates the device does not support migration version comparison and > > > that an errno on write indicates the devices are incompatible or the target > > > doesn't support migration versions. " > > > 2. vendor driver should log detailed error reasons in kernel log. > > > > Two questions: > > - How reasonable is it to refer to the system log in order to find out > > what exactly went wrong? > > - If detailed error reporting is basically done to the syslog, do > > different error codes still provide useful information? Or should the > > vendor driver decide what it wants to do? > > I don't see error codes as being that helpful; if we can't actually get > an error message back up the stack (which was my preference), then I guess > syslog is as good as it will get. Ok, so letting the vendor driver simply return an(y) error and possibly dumping an error message into the syslog seems to be the most reasonable approach.