All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: kvm@vger.kernel.org, Erik Skultety <eskultet@redhat.com>,
	libvirt <libvir-list@redhat.com>,
	Tina Zhang <tina.zhang@intel.com>,
	kwankhede@nvidia.com, intel-gvt-dev@lists.freedesktop.org
Subject: Re: [libvirt] [PATCH 0/3] sample: vfio mdev display devices.
Date: Thu, 19 Apr 2018 08:20:03 -0600	[thread overview]
Message-ID: <20180419082003.32322a17@w520.home> (raw)
In-Reply-To: <20180419084018.dnemdfl4fysg7gkj@sirius.home.kraxel.org>

On Thu, 19 Apr 2018 10:40:18 +0200
Gerd Hoffmann <kraxel@redhat.com> wrote:
> > So I was ready to return and suggest that maybe libvirt should probe
> > the device to know about these ancillary configuration details, but
> > then I remembered that both mdev vGPU vendors had external dependencies
> > to even allow probing the device.  KVMGT will fail to open the device
> > if it's not associated with an instance of KVM and NVIDIA vGPU, I
> > believe, will fail if the vGPU manager process cannot find the QEMU
> > instance to extract the VM UUID.  (Both of these were bad ideas)  
> 
> Oops.  I've trapped into the kvm issue too.  Wondering what the reason
> is, shouldn't this work with tcg too?

It's used for some sort of page tracking backdoor.  Yes, I think vfio
devices, including mdev, should work with tcg.  Separating device
assignment to not be integrally tied to kvm is something I've strived
for with vfio.

> But, yes, that indeed pretty much kills the "just let libvirt use the
> probe ioctl" idea.
> 
> > The existing device_api file reports "vfio-pci", so we base the device
> > API info in a directory named vfio-pci.  We're specifically exposing
> > device information, so we have a device directory.  We have a GFX_PLANE
> > query ioctl, so we have a gfx_plane sub-directory.  I imagine the
> > dmabuf and region files here expose either Y/N or 1/0.  
> 
> Do we want tie this to vfio-pci?  All existing devices are actually pci,
> and the qemu code only works for vfio-pci devices too.  But at vfio api
> level there is no vfio-pci dependency I'm aware of, and I think we
> shouldn't add one without a good reason.

The intention was to tie it to 'device_api' which reports 'vfio-pci',
so the user would read the device_api, learn that it uses vfio-pci,
then look for attributes in a vfio-pci sub-directory.  If device_api
reported vfio-ccw, they'd look for a vfio-ccw directory.

> Should we just add a gfx_plane_api file maybe?  Which would be a
> comma-separated list of interfaces, listed in order of preference in
> case multiple are supported.

I'm afraid that as soon as we get away from a strict representation of
the vfio API, we're going to see feature creep with such a solution.
Ex. which hw encoders are supported, frame rate limiters, number of
heads, etc.

> > anything other than mdev.  This inconsistency with physically assigned
> > devices has been one of my arguments against enhancing mdev sysfs.
> > 
> > Thanks to anyone still reading this.  Ideas how we might help libvirt
> > fill this information void so that they can actually configure a VM
> > with a display device?  Thanks,  
> 
> Well, no good idea for the physical assigned device case.

Minimally, I think anything we decide needs to be placed into the
instantiated device sysfs hierarchy rather than the template directory
for a given mdev type, otherwise we have no hope of supporting it with
physical devices.

> PS: Any comment on the sample driver patches?  Or should I take the lack
>     of comments as "no news is good news, they are queued up already"?

I do not have them queued yet, I'll take a closer look at them shortly
and let you know if I find any issues.  Thanks for doing these!  I think
they'll be very helpful, especially for the task above to provide
reference implementations for whatever API exposure we design.  Thanks,

Alex

  parent reply	other threads:[~2018-04-19 14:20 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180409103513.8020-1-kraxel@redhat.com>
2018-04-09 10:35 ` [PATCH 1/3] sample: vfio mdev display - host device Gerd Hoffmann
2018-04-24  2:41   ` Alex Williamson
2018-04-24  6:29     ` Gerd Hoffmann
2018-04-09 10:35 ` [PATCH 2/3] sample: vfio mdev display - guest driver Gerd Hoffmann
2018-04-11 20:39   ` Bjorn Helgaas
2018-04-24  2:51   ` Alex Williamson
2018-04-25 21:03   ` Konrad Rzeszutek Wilk
2018-04-09 10:35 ` [PATCH 3/3] sample: vfio bochs vbe display (host device for bochs-drm) Gerd Hoffmann
2018-04-24  3:05   ` Alex Williamson
2018-04-18 18:31 ` [libvirt] [PATCH 0/3] sample: vfio mdev display devices Alex Williamson
2018-04-19  8:40   ` Gerd Hoffmann
2018-04-19 10:03     ` Zhenyu Wang
2018-04-19 14:20     ` Alex Williamson [this message]
2018-04-19 14:54     ` Paolo Bonzini
2018-04-23 21:40   ` Alex Williamson
2018-04-24  7:17     ` Gerd Hoffmann
2018-04-24 17:35       ` Alex Williamson
2018-04-25  9:49         ` Zhang, Tina
2018-04-24 19:50     ` Kirti Wankhede
2018-04-24 22:59       ` Alex Williamson
2018-04-25 15:30         ` Kirti Wankhede
2018-04-25 18:00           ` Alex Williamson
2018-04-25 19:52             ` Dr. David Alan Gilbert
2018-04-26 18:45               ` Kirti Wankhede
2018-04-26 18:55                 ` Dr. David Alan Gilbert
2018-04-27 17:21                   ` Alex Williamson
2018-05-03 18:58                   ` [libvirt] Expose vfio device display/migration to libvirt and above, was " Alex Williamson
2018-05-04  7:49                     ` Erik Skultety
2018-05-04 16:03                       ` Alex Williamson
2018-05-07  6:25                         ` Gerd Hoffmann
2018-07-20  4:56                           ` Yuan, Hang
2018-08-08  7:43                             ` Gerd Hoffmann
2018-05-10 11:00                         ` Erik Skultety
2018-05-10 15:57                           ` Alex Williamson
2018-05-04  9:16                     ` Daniel P. Berrangé
2018-05-04 17:06                       ` Alex Williamson
2018-05-07  6:15                     ` Gerd Hoffmann
2018-05-04  8:39                 ` [libvirt] " Erik Skultety
2018-04-26  3:44   ` Tian, Kevin
2018-04-26  6:14     ` Gerd Hoffmann
2018-04-26 15:44       ` Alex Williamson

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=20180419082003.32322a17@w520.home \
    --to=alex.williamson@redhat.com \
    --cc=eskultet@redhat.com \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=kraxel@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=kwankhede@nvidia.com \
    --cc=libvir-list@redhat.com \
    --cc=tina.zhang@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.