From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 806DEC04AB1 for ; Thu, 9 May 2019 07:01:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5ADA5208C3 for ; Thu, 9 May 2019 07:01:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726608AbfEIHBK (ORCPT ); Thu, 9 May 2019 03:01:10 -0400 Received: from mga01.intel.com ([192.55.52.88]:5938 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725908AbfEIHBK (ORCPT ); Thu, 9 May 2019 03:01:10 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2019 00:01:10 -0700 X-ExtLoop1: 1 Received: from joy-optiplex-7040.sh.intel.com (HELO joy-OptiPlex-7040) ([10.239.13.9]) by fmsmga001.fm.intel.com with ESMTP; 09 May 2019 00:01:05 -0700 Date: Thu, 9 May 2019 02:55:27 -0400 From: Yan Zhao To: Boris Fiuczynski Cc: Alex Williamson , Halil Pasic , Tony Krowiak , Pierre Morel , "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" , "eskultet@redhat.com" , "Yang, Ziye" , "mlevitsk@redhat.com" , "libvir-list@redhat.com" , "arei.gonglei@huawei.com" , "felipe@nutanix.com" , "Ken.Xue@amd.com" , "Tian, Kevin" , "dgilbert@redhat.com" , "zhenyuw@linux.intel.com" , "dinechin@redhat.com" , "intel-gvt-dev@lists.freedesktop.org" , "Liu, Changpeng" , "cohuck@redhat.com" , "linux-kernel@vger.kernel.org" , "Wang, Zhi A" , "jonathan.davies@nutanix.com" , "He, Shaopeng" Subject: Re: [libvirt] [PATCH v2 1/2] vfio/mdev: add version attribute for mdev device Message-ID: <20190509065527.GG24397@joy-OptiPlex-7040> Reply-To: Yan Zhao References: <20190506014514.3555-1-yan.y.zhao@intel.com> <20190506014904.3621-1-yan.y.zhao@intel.com> <20190507151826.502be009@x1.home> <20190508112740.GA24397@joy-OptiPlex-7040> <20190508152242.4b54a5e7@x1.home> <5eac912c-e753-b5f6-83a4-b646f991d858@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5eac912c-e753-b5f6-83a4-b646f991d858@linux.ibm.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Wed, May 08, 2019 at 11:27:47PM +0800, Boris Fiuczynski wrote: > On 5/8/19 11:22 PM, Alex Williamson wrote: > >>> I thought there was a request to make this more specific to migration > >>> by renaming it to something like migration_version. Also, as an > >>> > >> so this attribute may not only include a mdev device's parent device info and > >> mdev type, but also include numeric software version of vendor specific > >> migration code, right? > > It's a vendor defined string, it should be considered opaque to the > > user, the vendor can include whatever they feel is relevant. > > > Would a vendor also be allowed to provide a string expressing required > features as well as containing backend resource requirements which need > to be compatible for a successful migration? Somehow a bit like a cpu > model... maybe even as json or xml... > I am asking this with vfio-ap in mind. In that context checking > compatibility of two vfio-ap mdev devices is not as simple as checking > if version A is smaller or equal to version B. > I think so. vendor driver is allowed to put whatever content into the migration_version string as long as it thinks it's necessary. vendor driver only needs ensure in the target mdev device, the write(2) operation on its migration_version attribute would correctly fail or succeeed based on the input string. Thanks Yan > -- > Mit freundlichen Grüßen/Kind regards > Boris Fiuczynski > > IBM Deutschland Research & Development GmbH > Vorsitzender des Aufsichtsrats: Matthias Hartmann > Geschäftsführung: Dirk Wittkopp > Sitz der Gesellschaft: Böblingen > Registergericht: Amtsgericht Stuttgart, HRB 243294 >