From patchwork Wed Oct 17 09:00:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenyu Wang X-Patchwork-Id: 10645157 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B1D59112B for ; Wed, 17 Oct 2018 09:06:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A681E2AB61 for ; Wed, 17 Oct 2018 09:06:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B26D2AC39; Wed, 17 Oct 2018 09:06:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A5EF2AB61 for ; Wed, 17 Oct 2018 09:06:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727335AbeJQRBJ (ORCPT ); Wed, 17 Oct 2018 13:01:09 -0400 Received: from mga06.intel.com ([134.134.136.31]:8814 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727253AbeJQRBJ (ORCPT ); Wed, 17 Oct 2018 13:01:09 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Oct 2018 02:06:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,391,1534834800"; d="scan'208";a="78678819" Received: from debian-nuc.sh.intel.com ([10.239.13.20]) by fmsmga007.fm.intel.com with ESMTP; 17 Oct 2018 02:06:23 -0700 From: Zhenyu Wang To: libvirt-list@redhat.com, kvm@vger.kernel.org Cc: intel-gvt-dev@lists.freedesktop.org, Kirti Wankhede , Alex Williamson , Kevin Tian , Cornelia Huck Subject: [PATCH v3 4/6] Documentation/vfio-mediated-device.txt: Update for vfio/mdev aggregation support Date: Wed, 17 Oct 2018 17:00:06 +0800 Message-Id: <20181017090008.16282-5-zhenyuw@linux.intel.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20180720021928.15343-1-zhenyuw@linux.intel.com> References: <20180720021928.15343-1-zhenyuw@linux.intel.com> MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Update vfio/mdev doc on new "aggregate" create parameter, new "aggregation" attribute and "aggregated_instances" attribute for mdev device. Cc: Kirti Wankhede Cc: Alex Williamson Cc: Kevin Tian Cc: Cornelia Huck Signed-off-by: Zhenyu Wang --- Documentation/vfio-mediated-device.txt | 44 ++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/Documentation/vfio-mediated-device.txt b/Documentation/vfio-mediated-device.txt index c3f69bcaf96e..cf4849a34c9f 100644 --- a/Documentation/vfio-mediated-device.txt +++ b/Documentation/vfio-mediated-device.txt @@ -211,12 +211,20 @@ Directories and files under the sysfs for Each Physical Device | | |--- description | | |--- [devices] | |--- [] - | |--- create - | |--- name - | |--- available_instances - | |--- device_api - | |--- description - | |--- [devices] + | | |--- create + | | |--- name + | | |--- available_instances + | | |--- device_api + | | |--- description + | | |--- [devices] + | |--- [] + | | |--- create + | | |--- name + | | |--- available_instances + | | |--- device_api + | | |--- description + | | |--- + | | |--- [devices] * [mdev_supported_types] @@ -260,6 +268,23 @@ Directories and files under the sysfs for Each Physical Device This attribute should show brief features/description of the type. This is optional attribute. +* + + is an optional attributes to show max number that the + instance resources of [] can be aggregated to be assigned + for one mdev device. No attribute means driver doesn't + support to aggregate instance resoures for one mdev device. + may be less than available_instances which depends on + driver. number can't exceed available_instances. + + Set number of instances by appending "aggregate=N" parameter for + create attribute. By default without "aggregate=N" parameter it + will create one instance as normal. + +Example:: + + # echo ",aggregate=N" > create + Directories and Files Under the sysfs for Each mdev Device ---------------------------------------------------------- @@ -268,6 +293,7 @@ Directories and Files Under the sysfs for Each mdev Device |- [parent phy device] |--- [$MDEV_UUID] |--- remove + |--- |--- mdev_type {link to its type} |--- vendor-specific-attributes [optional] @@ -281,6 +307,12 @@ Example:: # echo 1 > /sys/bus/mdev/devices/$mdev_UUID/remove +* (read only) + +For mdev created with aggregate parameter, this shows number of +instances assigned for this mdev. For normal type this attribute will +not exist. + Mediated device Hot plug ------------------------