Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1962190yba; Sun, 5 May 2019 18:53:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxTP/qzQJONJIf/GQT+EMVC49AT1LjMhewSq8LotP0aA1bILvcdx2mP4IeXxhm2KKKT6Lu1 X-Received: by 2002:a63:6ac3:: with SMTP id f186mr28647227pgc.326.1557107626359; Sun, 05 May 2019 18:53:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557107626; cv=none; d=google.com; s=arc-20160816; b=YkqMvbb5468lKNjtQTISRqat0lakm2gwam2462HN1tMPOdG2OmXYBaYU4O23NpZtmv tiMt2md26MAu+PzHyyDKTtOIEvNiYr7pzi8s5It1Yk8QgbgbNT0LoR/ZWn/+pbEzDCMu kbNeBDXUO5C0M0HkTgy05FYfeQg1rhQ6vUKKNxNo27/mXCKv38BGK8leRCblGjj2fkhF YPys8oxhtlGG4zd0qqAh6h5KBRXrMSORNLwytkgB3+CHV52mvRt0D5hibkKX7/MNNsE8 Oof/yek00bVAsYHlpMdh15dqUiLWgfHy7XiQBu4f0qoxOjP41o12P/yuwcCC2ttM8/hN +Y5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=n/zpncffcUndtelarn/5syj6Yv/Y4YBWu/dYqSOZPmc=; b=en2ULq8c0Nef6rk1fnVGfA+VAc7U6spwcjEmWnu1N8dtr4tJM2xC0KJ6DCvZxqutlD KuIY1qL8d2MTWrjHvqbWoh/bn23TtdrdHU+XnXQwsttCPvEArHJdRwiub0407zPULBEK zo0hBen3k6uiwaggrrNrzMvQ0hqTlzhIeZYEEvWSo6TJeEOZydkTglqKHcwPRNOyt774 S5nXYsIpqZZGFCBcUopLDZrQ9pIrFqPar/Fjn3EbN7zwgBplnOEPeHNUlhe0VAY7MJiG hlMUfKqcAJAmcOjilF5L56pSciz0o/CRZwfkuOnpyXGIwulidZxoUggPHr1XevF5b6qe cr/A== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si13960846plf.240.2019.05.05.18.53.30; Sun, 05 May 2019 18:53:46 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726128AbfEFBwm (ORCPT + 99 others); Sun, 5 May 2019 21:52:42 -0400 Received: from mga04.intel.com ([192.55.52.120]:18307 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725786AbfEFBwm (ORCPT ); Sun, 5 May 2019 21:52:42 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 May 2019 18:52:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,435,1549958400"; d="scan'208";a="140310192" Received: from joy-optiplex-7040.sh.intel.com ([10.239.13.9]) by orsmga008.jf.intel.com with ESMTP; 05 May 2019 18:52:35 -0700 From: Yan Zhao To: intel-gvt-dev@lists.freedesktop.org Cc: arei.gonglei@huawei.com, aik@ozlabs.ru, Zhengxiao.zx@alibaba-inc.com, shuangtai.tst@alibaba-inc.com, qemu-devel@nongnu.org, eauger@redhat.com, yi.l.liu@intel.com, ziye.yang@intel.com, mlevitsk@redhat.com, pasic@linux.ibm.com, felipe@nutanix.com, changpeng.liu@intel.com, Ken.Xue@amd.com, jonathan.davies@nutanix.com, shaopeng.he@intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, libvir-list@redhat.com, alex.williamson@redhat.com, eskultet@redhat.com, dgilbert@redhat.com, cohuck@redhat.com, kevin.tian@intel.com, zhenyuw@linux.intel.com, zhi.a.wang@intel.com, cjia@nvidia.com, kwankhede@nvidia.com, berrange@redhat.com, dinechin@redhat.com, Yan Zhao Subject: [PATCH v2 0/2] introduction of version attribute for VFIO live migration Date: Sun, 5 May 2019 21:45:14 -0400 Message-Id: <20190506014514.3555-1-yan.y.zhao@intel.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset introduces a version attribute under sysfs of VFIO Mediated devices. This version attribute is used to check whether two mdev devices are compatible. user space software can take advantage of this version attribute to determine whether to launch live migration between two mdev devices. Patch 1 defines version attribute in Documentation/vfio-mediated-device.txt Patch 2 uses GVT as an example to show how to expose version attribute and check device compatibility in vendor driver. v2: 1. renamed patched 1 2. made definition of device version string completely private to vendor driver 3. abandoned changes to sample mdev drivers 4. described intent and usage of version attribute more clearly. Yan Zhao (2): vfio/mdev: add version attribute for mdev device drm/i915/gvt: export mdev device version to sysfs for Intel vGPU Documentation/vfio-mediated-device.txt | 135 ++++++++++++++++++++++ drivers/gpu/drm/i915/gvt/Makefile | 2 +- drivers/gpu/drm/i915/gvt/device_version.c | 84 ++++++++++++++ drivers/gpu/drm/i915/gvt/gvt.c | 51 ++++++++ drivers/gpu/drm/i915/gvt/gvt.h | 6 + 5 files changed, 277 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/i915/gvt/device_version.c -- 2.17.1