From: Kirti Wankhede <kwankhede@nvidia.com>
To: <alex.williamson@redhat.com>, <eskultet@redhat.com>,
<kvm@vger.kernel.org>, <libvir-list@redhat.com>
Cc: Kirti Wankhede <kwankhede@nvidia.com>, cjia@nvidia.com
Subject: [libvirt] [RFC PATCH v1 1/1] Add attribute multiple_mdev_support for mdev type-id
Date: Thu, 27 Sep 2018 11:52:00 +0530 [thread overview]
Message-ID: <1538029320-6034-1-git-send-email-kwankhede@nvidia.com> (raw)
Generally a single instance of mdev device, a share of physical device, is
assigned to user space application or a VM. There are cases when multiple
instances of mdev devices of same or different types are required by User
space application or VM. For example in case of vGPU, multiple mdev devices
of type which represents whole GPU can be assigned to one instance of
application or VM.
All types of mdev devices may not support assigning multiple mdev devices
to a user space application. In that case vendor driver can fail open()
call of mdev device. But there is no way to know User space application
about the configuration supported by vendor driver.
To expose supported configuration, vendor driver should add
'multiple_mdev_support' attribute to type-id directory if vendor driver
supports assigning multiple mdev devices of a particular type-id to one
instance of user space application or a VM.
User space application should read if 'multiple_mdev_support' attibute is
present in type-id directory of all mdev devices which are going to be
used. If all read 1 then user space application can proceed with multiple
mdev devices.
This is optional and readonly attribute.
Signed-off-by: Neo Jia <cjia@nvidia.com>
Signed-off-by: Kirti Wankhede <kwankhede@nvidia.com>
---
Documentation/ABI/testing/sysfs-bus-vfio-mdev | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-bus-vfio-mdev b/Documentation/ABI/testing/sysfs-bus-vfio-mdev
index 452dbe39270e..69e1291479ce 100644
--- a/Documentation/ABI/testing/sysfs-bus-vfio-mdev
+++ b/Documentation/ABI/testing/sysfs-bus-vfio-mdev
@@ -85,6 +85,19 @@ Users:
a particular <type-id> that can help in understanding the
features provided by that type of mediated device.
+What: /sys/.../mdev_supported_types/<type-id>/multiple_mdev_support
+Date: September 2018
+Contact: Kirti Wankhede <kwankhede@nvidia.com>
+Description:
+ Reading this attribute will return 0 or 1. Returning 1 indicates
+ multiple mdev devices of a particular <type-id> assigned to one
+ User space application is supported by vendor driver. This is
+ optional and readonly attribute.
+Users:
+ Userspace applications interested in knowing if multiple mdev
+ devices of a particular <type-id> can be assigned to one
+ instance of application.
+
What: /sys/.../<device>/<UUID>/
Date: October 2016
Contact: Kirti Wankhede <kwankhede@nvidia.com>
--
2.7.0
next reply other threads:[~2018-09-27 6:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-27 6:22 Kirti Wankhede [this message]
2018-09-27 6:48 ` [libvirt] [RFC PATCH v1 1/1] Add attribute multiple_mdev_support for mdev type-id Tian, Kevin
2018-09-27 15:59 ` Alex Williamson
2018-09-27 19:23 ` Kirti Wankhede
2018-09-27 20:01 ` Alex Williamson
2018-09-28 1:27 ` Tian, Kevin
2018-09-28 1:29 ` Tian, Kevin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1538029320-6034-1-git-send-email-kwankhede@nvidia.com \
--to=kwankhede@nvidia.com \
--cc=alex.williamson@redhat.com \
--cc=cjia@nvidia.com \
--cc=eskultet@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=libvir-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox