From patchwork Thu Oct 24 05:08:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenyu Wang X-Patchwork-Id: 11208287 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 30F1614E5 for ; Thu, 24 Oct 2019 05:08:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1A1F42166E for ; Thu, 24 Oct 2019 05:08:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437468AbfJXFIk (ORCPT ); Thu, 24 Oct 2019 01:08:40 -0400 Received: from mga11.intel.com ([192.55.52.93]:7748 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437457AbfJXFIj (ORCPT ); Thu, 24 Oct 2019 01:08:39 -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 fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2019 22:08:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,223,1569308400"; d="scan'208";a="197627654" Received: from debian-nuc.sh.intel.com ([10.239.160.133]) by fmsmga007.fm.intel.com with ESMTP; 23 Oct 2019 22:08:38 -0700 From: Zhenyu Wang To: kvm@vger.kernel.org Cc: alex.williamson@redhat.com, kwankhede@nvidia.com, kevin.tian@intel.com, cohuck@redhat.com Subject: [PATCH 4/6] Documentation/driver-api/vfio-mediated-device.rst: Update for vfio/mdev aggregation support Date: Thu, 24 Oct 2019 13:08:27 +0800 Message-Id: <20191024050829.4517-5-zhenyuw@linux.intel.com> X-Mailer: git-send-email 2.24.0.rc0 In-Reply-To: <20191024050829.4517-1-zhenyuw@linux.intel.com> References: <20191024050829.4517-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 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 --- .../driver-api/vfio-mediated-device.rst | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Documentation/driver-api/vfio-mediated-device.rst b/Documentation/driver-api/vfio-mediated-device.rst index 25eb7d5b834b..2881be654516 100644 --- a/Documentation/driver-api/vfio-mediated-device.rst +++ b/Documentation/driver-api/vfio-mediated-device.rst @@ -216,6 +216,7 @@ Directories and files under the sysfs for Each Physical Device | |--- available_instances | |--- device_api | |--- description + | |--- | |--- [devices] * [mdev_supported_types] @@ -260,6 +261,21 @@ 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 maximum 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. + + 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 +284,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 +298,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 ------------------------