All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kirti Wankhede <kwankhede@nvidia.com>
To: "Tian, Kevin" <kevin.tian@intel.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	Neo Jia <cjia@nvidia.com>, Gerd Hoffmann <kraxel@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: "Ruan, Shuai" <shuai.ruan@intel.com>,
	"Song, Jike" <jike.song@intel.com>,
	"Lv, Zhiyuan" <zhiyuan.lv@intel.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [RFC PATCH v1 1/1] vGPU core driver : to provide common interface for vGPU.
Date: Wed, 3 Feb 2016 18:51:03 +0530	[thread overview]
Message-ID: <56B1FEBF.4050100@nvidia.com> (raw)
In-Reply-To: <AADFC41AFE54684AB9EE6CBC0274A5D15F79CB89@SHSMSX103.ccr.corp.intel.com>



On 2/3/2016 11:26 AM, Tian, Kevin wrote:
[...]
>>>>>     * @vgpu_create:        Called to allocate basic resouces in graphics
>>>>>     *                      driver for a particular vgpu.
>>>>>     *                      @dev: physical pci device structure on which vgpu
>>>>>     *                            should be created
>>>>>     *                      @uuid: uuid for which VM it is intended to
>>>>>     *                      @instance: vgpu instance in that VM
>>>>>     *                      @vgpu_id: This represents the type of vgpu to be
>>>>>     *                                created
>>>>>     *                      Returns integer: success (0) or error (< 0)
>>>
>>> Specifically for Intel GVT-g we didn't hard partition resource among vGPUs.
>>> Instead we allow user to accurately control how many physical resources
>>> are allocated to a vGPU. So this interface should be extensible to allow
>>> vendor specific resource control.
>>>
>>
>> This interface forwards the create request to vendor/GPU driver
>> informing about which physical GPU this request is intended for and the
>> type of vGPU. Then its vendor/GPU driver's responsibility to do
>> resources allocation and manage resources in their own driver.
>
> However the current parameter definition disallows resource configuration
> information passed from user. As I said, Intel GVT-g doesn't do static
> allocation based on type. We provide flexibility to user for fine-grained
> resource management.
>

         int     (*vgpu_create)(struct pci_dev *dev, uuid_le uuid,
-                              uint32_t instance, uint32_t vgpu_id);
+                              uint32_t instance, char *vgpu_params);

If we change integer vgpu_id parameter to char *vgpu_param then GPU 
driver can have multiple parameters.

Suppose there is a GPU at 0000:85:00.0, then to create vgpu:
# echo "<uuid>:<vgpu_instance>:<vgpu_params string>" > 
/sys/bus/pci/devices/0000\:85\:00.0/vgpu_create

Common vgpu module will not parse vgpu_params string, it will be 
forwarded to GPU driver, then its GPU driver's responsibility to parse 
the string and act accordingly. This should give flexibility to have 
multiple parameters for GPU driver.

>>>>>     *
>>>>>     * Physical GPU that support vGPU should be register with vgpu module with
>>>>>     * gpu_device_ops structure.
>>>>>     */
>>>>>
>>>
>>> Also it'd be good design to allow extensible usages, such as statistics, and
>>> other vendor specific control knobs (e.g. foreground/background VM switch
>>> in Intel GVT-g, etc.)
>>>
>>
>> Can you elaborate on what other control knobs that would be needed?
>>
>
> Some examples:
>
> - foreground/background VM switch
> - resource query
> - various statistics info
> - virtual monitor configuration
> - ...
>
> Since this vgpu core driver will become the central point for all vgpu
> management, we need provide an easy way for vendor specific extension,
> e.g. exposing above callbacks as sysfs nodes and then vendor can create
> its own extensions under subdirectory (/intel, /nvidia, ...).
>
>

Ok. Makes sense.

Are these parameters per physical device or per vgpu device?

Adding attribute groups to gpu_device_ops structure would provide a way 
to add vendor specific extensions. I think we need two types of 
attributes here, per physical device and per vgpu device. Right?

          const struct attribute_group **dev_groups;
          const struct attribute_group **vgpu_groups;



Thanks,
Kirti.

> Thanks
> Kevin
>

WARNING: multiple messages have this Message-ID (diff)
From: Kirti Wankhede <kwankhede@nvidia.com>
To: "Tian, Kevin" <kevin.tian@intel.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	Neo Jia <cjia@nvidia.com>, Gerd Hoffmann <kraxel@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: "Ruan, Shuai" <shuai.ruan@intel.com>,
	"Song, Jike" <jike.song@intel.com>,
	"Lv, Zhiyuan" <zhiyuan.lv@intel.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [RFC PATCH v1 1/1] vGPU core driver : to provide common interface for vGPU.
Date: Wed, 3 Feb 2016 18:51:03 +0530	[thread overview]
Message-ID: <56B1FEBF.4050100@nvidia.com> (raw)
In-Reply-To: <AADFC41AFE54684AB9EE6CBC0274A5D15F79CB89@SHSMSX103.ccr.corp.intel.com>



On 2/3/2016 11:26 AM, Tian, Kevin wrote:
[...]
>>>>>     * @vgpu_create:        Called to allocate basic resouces in graphics
>>>>>     *                      driver for a particular vgpu.
>>>>>     *                      @dev: physical pci device structure on which vgpu
>>>>>     *                            should be created
>>>>>     *                      @uuid: uuid for which VM it is intended to
>>>>>     *                      @instance: vgpu instance in that VM
>>>>>     *                      @vgpu_id: This represents the type of vgpu to be
>>>>>     *                                created
>>>>>     *                      Returns integer: success (0) or error (< 0)
>>>
>>> Specifically for Intel GVT-g we didn't hard partition resource among vGPUs.
>>> Instead we allow user to accurately control how many physical resources
>>> are allocated to a vGPU. So this interface should be extensible to allow
>>> vendor specific resource control.
>>>
>>
>> This interface forwards the create request to vendor/GPU driver
>> informing about which physical GPU this request is intended for and the
>> type of vGPU. Then its vendor/GPU driver's responsibility to do
>> resources allocation and manage resources in their own driver.
>
> However the current parameter definition disallows resource configuration
> information passed from user. As I said, Intel GVT-g doesn't do static
> allocation based on type. We provide flexibility to user for fine-grained
> resource management.
>

         int     (*vgpu_create)(struct pci_dev *dev, uuid_le uuid,
-                              uint32_t instance, uint32_t vgpu_id);
+                              uint32_t instance, char *vgpu_params);

If we change integer vgpu_id parameter to char *vgpu_param then GPU 
driver can have multiple parameters.

Suppose there is a GPU at 0000:85:00.0, then to create vgpu:
# echo "<uuid>:<vgpu_instance>:<vgpu_params string>" > 
/sys/bus/pci/devices/0000\:85\:00.0/vgpu_create

Common vgpu module will not parse vgpu_params string, it will be 
forwarded to GPU driver, then its GPU driver's responsibility to parse 
the string and act accordingly. This should give flexibility to have 
multiple parameters for GPU driver.

>>>>>     *
>>>>>     * Physical GPU that support vGPU should be register with vgpu module with
>>>>>     * gpu_device_ops structure.
>>>>>     */
>>>>>
>>>
>>> Also it'd be good design to allow extensible usages, such as statistics, and
>>> other vendor specific control knobs (e.g. foreground/background VM switch
>>> in Intel GVT-g, etc.)
>>>
>>
>> Can you elaborate on what other control knobs that would be needed?
>>
>
> Some examples:
>
> - foreground/background VM switch
> - resource query
> - various statistics info
> - virtual monitor configuration
> - ...
>
> Since this vgpu core driver will become the central point for all vgpu
> management, we need provide an easy way for vendor specific extension,
> e.g. exposing above callbacks as sysfs nodes and then vendor can create
> its own extensions under subdirectory (/intel, /nvidia, ...).
>
>

Ok. Makes sense.

Are these parameters per physical device or per vgpu device?

Adding attribute groups to gpu_device_ops structure would provide a way 
to add vendor specific extensions. I think we need two types of 
attributes here, per physical device and per vgpu device. Right?

          const struct attribute_group **dev_groups;
          const struct attribute_group **vgpu_groups;



Thanks,
Kirti.

> Thanks
> Kevin
>

  reply	other threads:[~2016-02-03 13:21 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <56AFD231.3010404@nvidia.com>
2016-02-02  1:48 ` [RFC PATCH v1 1/1] vGPU core driver : to provide common interface for vGPU Kirti Wankhede
2016-02-02  1:48   ` [Qemu-devel] " Kirti Wankhede
2016-02-02  7:42   ` Tian, Kevin
2016-02-02  7:42     ` [Qemu-devel] " Tian, Kevin
2016-02-02  8:00     ` Gerd Hoffmann
2016-02-02  8:00       ` [Qemu-devel] " Gerd Hoffmann
2016-02-02  8:13       ` Neo Jia
2016-02-02  8:13         ` [Qemu-devel] " Neo Jia
2016-02-02  8:18         ` Tian, Kevin
2016-02-02  8:18           ` [Qemu-devel] " Tian, Kevin
2016-02-02  8:31           ` Neo Jia
2016-02-02  8:31             ` [Qemu-devel] " Neo Jia
2016-02-02 17:11             ` Alex Williamson
2016-02-02 17:11               ` [Qemu-devel] " Alex Williamson
2016-02-03  5:41               ` Tian, Kevin
2016-02-03  5:41                 ` [Qemu-devel] " Tian, Kevin
2016-02-03  8:28                 ` Gerd Hoffmann
2016-02-03  8:28                   ` [Qemu-devel] " Gerd Hoffmann
2016-02-03 19:32                   ` Alex Williamson
2016-02-03 19:32                     ` [Qemu-devel] " Alex Williamson
2016-02-16  6:49                     ` Tian, Kevin
2016-02-16  6:49                       ` [Qemu-devel] " Tian, Kevin
2016-02-16  7:13                       ` Neo Jia
2016-02-16  7:13                         ` [Qemu-devel] " Neo Jia
2016-02-16  7:27                         ` Tian, Kevin
2016-02-16  7:27                           ` [Qemu-devel] " Tian, Kevin
2016-02-16  7:36                           ` Neo Jia
2016-02-16  7:36                             ` [Qemu-devel] " Neo Jia
2016-02-16  7:40                             ` Tian, Kevin
2016-02-16  7:40                               ` [Qemu-devel] " Tian, Kevin
2016-02-16  7:53                               ` Neo Jia
2016-02-16  7:53                                 ` [Qemu-devel] " Neo Jia
2016-02-16  8:10                                 ` Tian, Kevin
2016-02-16  8:10                                   ` [Qemu-devel] " Tian, Kevin
2016-02-16  8:48                                   ` Neo Jia
2016-02-16  8:48                                     ` [Qemu-devel] " Neo Jia
2016-02-17  3:31                                     ` Tian, Kevin
2016-02-17  3:31                                       ` [Qemu-devel] " Tian, Kevin
2016-02-17  4:17                                       ` Neo Jia
2016-02-17  4:17                                         ` [Qemu-devel] " Neo Jia
2016-02-17  5:04                                         ` Tian, Kevin
2016-02-17  5:04                                           ` [Qemu-devel] " Tian, Kevin
2016-02-17  5:09                                           ` Eric Blake
2016-02-17  5:40                                             ` Neo Jia
2016-02-17  5:40                                               ` Neo Jia
2016-02-17  5:37                                           ` Neo Jia
2016-02-17  6:02                                             ` Tian, Kevin
2016-02-17  6:02                                               ` Tian, Kevin
2016-02-17  7:26                                               ` Neo Jia
2016-02-17  7:46                                                 ` Tian, Kevin
2016-02-17  7:46                                                   ` Tian, Kevin
2016-02-17  7:54                                                   ` Neo Jia
2016-02-17  8:57                                                     ` Tian, Kevin
2016-02-17  8:57                                                       ` Tian, Kevin
2016-02-17  9:34                                                       ` Neo Jia
2016-02-17  9:52                                                         ` Tian, Kevin
2016-02-17  9:52                                                           ` Tian, Kevin
2016-02-17 10:34                                                           ` Neo Jia
2016-02-17 10:34                                                             ` Neo Jia
2016-02-17 10:47                                                             ` Tian, Kevin
2016-02-17 10:47                                                               ` Tian, Kevin
2016-02-17 13:08                                                     ` Gerd Hoffmann
2016-02-17 13:08                                                       ` Gerd Hoffmann
2016-02-17 15:36                                                       ` Neo Jia
2016-02-17 15:36                                                         ` Neo Jia
2016-02-17  6:52                                         ` Gerd Hoffmann
2016-02-17  6:52                                           ` [Qemu-devel] " Gerd Hoffmann
2016-02-17  7:32                                           ` Neo Jia
2016-02-17  7:32                                             ` [Qemu-devel] " Neo Jia
2016-02-17  7:51                                             ` Tian, Kevin
2016-02-17  7:51                                               ` [Qemu-devel] " Tian, Kevin
2016-02-17  8:41                                               ` Neo Jia
2016-02-17  8:41                                                 ` [Qemu-devel] " Neo Jia
2016-02-17  9:01                                                 ` Tian, Kevin
2016-02-17  9:01                                                   ` [Qemu-devel] " Tian, Kevin
2016-02-02  8:29         ` Gerd Hoffmann
2016-02-02  8:29           ` [Qemu-devel] " Gerd Hoffmann
2016-02-02  9:25     ` Kirti Wankhede
2016-02-02  9:25       ` [Qemu-devel] " Kirti Wankhede
2016-02-03  5:56       ` Tian, Kevin
2016-02-03  5:56         ` [Qemu-devel] " Tian, Kevin
2016-02-03 13:21         ` Kirti Wankhede [this message]
2016-02-03 13:21           ` Kirti Wankhede
2016-02-04  3:08           ` Tian, Kevin
2016-02-04  3:08             ` [Qemu-devel] " 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=56B1FEBF.4050100@nvidia.com \
    --to=kwankhede@nvidia.com \
    --cc=alex.williamson@redhat.com \
    --cc=cjia@nvidia.com \
    --cc=jike.song@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=kraxel@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=shuai.ruan@intel.com \
    --cc=zhiyuan.lv@intel.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 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.