All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Gurtovoy <mgurtovoy@nvidia.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: jasowang@redhat.com, virtio-comment@lists.oasis-open.org,
	cohuck@redhat.com, virtio-dev@lists.oasis-open.org,
	oren@nvidia.com, parav@nvidia.com, shahafs@nvidia.com,
	aadam@redhat.com, virtio@lists.oasis-open.org
Subject: Re: [PATCH v5 7/7] RFC: add initial support for configuring feature bits
Date: Thu, 19 May 2022 02:18:51 +0300	[thread overview]
Message-ID: <76eec107-9cf2-f09e-7ba4-bd190683a1ce@nvidia.com> (raw)
In-Reply-To: <20220518123406-mutt-send-email-mst@kernel.org>


On 5/18/2022 7:34 PM, Michael S. Tsirkin wrote:
> On Wed, May 18, 2022 at 06:31:18PM +0300, Max Gurtovoy wrote:
>> On 5/15/2022 5:38 PM, Michael S. Tsirkin wrote:
>>> On Wed, Apr 27, 2022 at 01:58:24AM +0300, Max Gurtovoy wrote:
>>>> After adding the concept of a management and a managed device, add
>>>> another example of using this concept to manage resources.
>>>>
>>>> Today there is no standard definition in the spec that allows user to
>>>> setup specific feature bits of a virtio device.
>>>>
>>>> For that, extend the management mechanism to allow management devices to
>>>> change feature bits of its managed devices.
>>>>
>>>> Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
>>> Please, add more explanation here. E.g. I am guessing these are
>>> host feature bits, right? How does driver know which features are
>>> ok to enable?
>>>
>>> I would expect some description sections and conformance sections.
>>>
>> This is an RFC to emphasize the need for the admin command set.
>>
>> I added this because we agreed to think on more features for showing the
>> motivation of this mechanism.
>>
>> I can work on MSI-X or feature bits as initial submission.
>>
>> Choose what do you think will be easier to merge and lets keep working on
>> it.
>>
>> Working on both will cause distraction.
> OK.
>
> I personally think feature bits are easier, we don't need to also refer
> to the pci spec.

If you think it will accelerate the process of acceptance than I can 
give it a try.

Although I really don't understand the gap we have for MSI-X.

Just need to keep some rules such as not allowing a VF to be bounded to 
a device driver before performing the configuration.

it's very easy and works today for mlx5.

I also hope someone will add it to nvme driver since this functionality 
is in NVM spec.

Maybe I'll do it myself if I'll find some time soon.

Also, if we'll do the feature bits configuration still the pre-condition 
for it to work will be to make sure that the VF is not bounded to a 
device driver, same as for MSI-X.

>
>>>> ---
>>>>    admin.tex | 12 +++++++++---
>>>>    1 file changed, 9 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/admin.tex b/admin.tex
>>>> index 5b54743..43106ba 100644
>>>> --- a/admin.tex
>>>> +++ b/admin.tex
>>>> @@ -113,7 +113,9 @@ \subsection{VIRTIO ADMIN DEVICE CAPS IDENTIFY command}\label{sec:Basic Facilitie
>>>>            * Bit 0 - if set, the device is a management device
>>>>            * Bit 1 - if set, the device is a type 1 management device that supports
>>>>            *         MSI-X vector mgmt of its type 1 managed devices
>>>> -        * Bits 2 - 63 - reserved for future capabilities.
>>>> +        * Bit 2 - if set, the device is a type 1 management device that supports
>>>> +        *         feature mgmt of bits 0 to 63 for its type 1 managed devices
>>>> +        * Bits 3 - 63 - reserved for future capabilities.
>>>>            */
>>>>           le64 device_admin_caps;
>>>>           u8 reserved[112];
>>>> @@ -143,7 +145,9 @@ \subsection{VIRTIO ADMIN DEVICE CAPS ACCEPT command}\label{sec:Basic Facilities
>>>>            * Bit 0 - if set, the driver accepted the device as a management device
>>>>            * Bit 1 - if set, the driver accepted the device as a type 1 management device
>>>>            *         that supports MSI-X vector mgmt of its type 1 managed devices
>>>> -        * Bits 2 - 63 - reserved for future capabilities.
>>>> +        * Bit 2 - if set, the driver accepted the device as a type 1 management device
>>>> +        *         that supports feature mgmt of bits 0 to 63 for its type 1 managed devices
>>>> +        * Bits 3 - 63 - reserved for future capabilities.
>>>>            */
>>>>           le64 driver_admin_caps;
>>>>           u8 reserved[112];
>>>> @@ -167,12 +171,14 @@ \subsection{VIRTIO ADMIN DEVICE MGMT command}\label{sec:Basic Facilities of a Vi
>>>>            u8 operation;
>>>>            /*
>>>>             * 0 - MSI-X vector
>>>> -         * 1 - 65535 are reserved
>>>> +         * 1 - Device feature bits 0 to 63
>>>> +         * 2 - 65535 are reserved
>>>>             */
>>>>            le16 resource;
>>>>            /*
>>>>             * The value to the given resource:
>>>>             * if resource = 0 (MSI-X vector), it's a 1-based count.
>>>> +         * if resource = 1 (Device feature bits 0 to 63), it's a feature bitmap.
>>>>             */
>>>>            le64 resource_val;
>>>>            u8 reserved[5];
>>>> -- 
>>>> 2.21.0


  reply	other threads:[~2022-05-18 23:18 UTC|newest]

Thread overview: 103+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26 22:58 [PATCH v5 0/7] Introduce device group and device management Max Gurtovoy
2022-04-26 22:58 ` [virtio-comment] [PATCH v5 1/7] Introduce device group Max Gurtovoy
2022-05-15 15:25   ` Michael S. Tsirkin
2022-05-18 13:14     ` [virtio-comment] " Max Gurtovoy
2022-05-18 13:32       ` Cornelia Huck
2022-06-01 13:43         ` Max Gurtovoy
2022-06-02  2:21           ` Jason Wang
2022-06-02  6:59             ` Michael S. Tsirkin
2022-06-27 21:52               ` Max Gurtovoy
2022-06-28 18:54                 ` Michael S. Tsirkin
2022-07-06 11:25                   ` Max Gurtovoy
2022-07-06 11:42                     ` Michael S. Tsirkin
2022-07-06 12:01                       ` Max Gurtovoy
2022-07-06 12:23                         ` Michael S. Tsirkin
2022-07-06 15:18                           ` Max Gurtovoy
2022-04-26 22:58 ` [PATCH v5 2/7] Introduce admin command set Max Gurtovoy
2022-05-15 15:23   ` Michael S. Tsirkin
2022-05-16 21:08     ` [virtio-comment] " Parav Pandit
2022-05-17 10:08       ` [virtio-dev] " Cornelia Huck
2022-05-18 13:42         ` Max Gurtovoy
2022-05-17 11:48       ` Michael S. Tsirkin
2022-05-18 14:09         ` Max Gurtovoy
2022-05-18 14:42           ` [virtio] " Cornelia Huck
2022-05-18 14:48             ` Max Gurtovoy
2022-05-31 20:39         ` Parav Pandit
2022-06-20  9:23           ` Michael S. Tsirkin
2022-06-20  9:49             ` Michael S. Tsirkin
2022-06-20  9:59           ` Michael S. Tsirkin
2022-06-20 11:06             ` Parav Pandit
2022-06-20 16:46               ` Michael S. Tsirkin
2022-06-20 16:54                 ` Max Gurtovoy
2022-06-20 17:04                   ` Michael S. Tsirkin
2022-06-20 17:19                     ` Parav Pandit
2022-06-20 20:53                       ` Michael S. Tsirkin
2022-06-20 23:54                         ` Parav Pandit
2022-06-20 17:16                 ` Parav Pandit
2022-06-23  1:26               ` Jason Wang
2022-06-23  2:07                 ` Parav Pandit
2022-06-23  2:41                   ` Jason Wang
2022-06-23  2:57                     ` Parav Pandit
2022-06-23  3:34                       ` Jason Wang
2022-06-28 14:24                         ` Michael S. Tsirkin
2022-06-29  8:43                           ` Jason Wang
2022-06-29  9:02                             ` Michael S. Tsirkin
2022-06-30  1:53                               ` Jason Wang
2022-05-18 13:39     ` [virtio-comment] " Max Gurtovoy
2022-05-18 13:50       ` [virtio] " Cornelia Huck
2022-05-18 14:16         ` Max Gurtovoy
2022-06-20 22:26           ` Michael S. Tsirkin
2022-06-20 21:08       ` Michael S. Tsirkin
2022-04-26 22:58 ` [PATCH v5 3/7] Introduce new destination type for admin commands Max Gurtovoy
2022-05-15 15:01   ` Michael S. Tsirkin
2022-05-18 14:27     ` [virtio-comment] " Max Gurtovoy
2022-05-15 15:09   ` Michael S. Tsirkin
2022-05-16 21:21     ` Parav Pandit
2022-05-16 23:33       ` Michael S. Tsirkin
2022-05-18 14:36         ` Max Gurtovoy
2022-05-18 14:34     ` Max Gurtovoy
2022-05-18 23:55       ` Michael S. Tsirkin
2022-04-26 22:58 ` [PATCH v5 4/7] Introduce virtio admin virtqueue Max Gurtovoy
2022-05-15 14:59   ` Michael S. Tsirkin
2022-05-18 14:37     ` Max Gurtovoy
2022-05-18 23:56       ` Michael S. Tsirkin
2022-04-26 22:58 ` [PATCH v5 5/7] Add miscellaneous configuration structure for PCI Max Gurtovoy
2022-05-15 14:49   ` Michael S. Tsirkin
2022-06-01 14:46     ` Max Gurtovoy
2022-05-15 14:57   ` Michael S. Tsirkin
2022-05-17 10:12     ` [virtio] " Cornelia Huck
2022-05-18 14:42       ` Max Gurtovoy
2022-05-18 23:58         ` Michael S. Tsirkin
2022-04-26 22:58 ` [PATCH v5 6/7] Introduce MGMT admin commands Max Gurtovoy
2022-05-15 14:37   ` Michael S. Tsirkin
2022-05-16 21:47     ` Parav Pandit
2022-05-17 12:31       ` [virtio-comment] " Michael S. Tsirkin
2022-05-18 15:14         ` Max Gurtovoy
2022-05-17  2:28     ` Jason Wang
2022-05-18 15:27       ` Max Gurtovoy
2022-05-18 16:41         ` Michael S. Tsirkin
2022-05-18 23:10           ` Max Gurtovoy
2022-05-18 15:03     ` Max Gurtovoy
2022-06-20  9:45       ` Michael S. Tsirkin
2022-04-26 22:58 ` [PATCH v5 7/7] RFC: add initial support for configuring feature bits Max Gurtovoy
2022-05-15 14:38   ` Michael S. Tsirkin
2022-05-18 15:31     ` Max Gurtovoy
2022-05-18 16:34       ` Michael S. Tsirkin
2022-05-18 23:18         ` Max Gurtovoy [this message]
2022-05-15 15:27 ` [PATCH v5 0/7] Introduce device group and device management Michael S. Tsirkin
2022-05-18 15:32   ` Max Gurtovoy
2022-07-05 13:56 ` Michael S. Tsirkin
2022-07-05 15:11   ` [virtio-comment] " Parav Pandit
2022-07-06  2:54     ` [virtio-dev] " Jason Wang
2022-07-06 10:10       ` Michael S. Tsirkin
2022-07-06 10:46       ` [virtio-comment] " Parav Pandit
2022-07-06 11:00     ` Michael S. Tsirkin
2022-07-06 20:45       ` Parav Pandit
2022-07-24 21:09         ` Michael S. Tsirkin
2022-07-24 21:25           ` [virtio-comment] " Parav Pandit
2022-07-24 23:41             ` Michael S. Tsirkin
2022-07-25  2:53               ` [virtio-comment] " Parav Pandit
2022-07-25  7:44                 ` Michael S. Tsirkin
2022-07-30 13:21                   ` [virtio-comment] " Parav Pandit
2022-07-31 15:38                     ` Michael S. Tsirkin
2022-08-02 17:40                       ` Parav Pandit

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=76eec107-9cf2-f09e-7ba4-bd190683a1ce@nvidia.com \
    --to=mgurtovoy@nvidia.com \
    --cc=aadam@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=oren@nvidia.com \
    --cc=parav@nvidia.com \
    --cc=shahafs@nvidia.com \
    --cc=virtio-comment@lists.oasis-open.org \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=virtio@lists.oasis-open.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.