linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julian Stecklina <julian.stecklina@cyberus-technology.de>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: intel-gvt-dev@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	zhiyuan.lv@intel.com, hang.yuan@intel.com,
	Zhenyu Wang <zhenyuw@linux.intel.com>,
	Thomas Prescher <thomas.prescher@cyberus-technology.de>
Subject: Re: [RFC PATCH 4/4] drm/i915/gvt: move public gvt headers out into global include
Date: Thu, 16 Jan 2020 15:13:01 +0100	[thread overview]
Message-ID: <9b32e225ee680e61716e300eb1ed8387599cc0dd.camel@cyberus-technology.de> (raw)
In-Reply-To: <20200115152215.GA3830321@kroah.com>

Hi Greg, Christoph,

On Wed, 2020-01-15 at 16:22 +0100, Greg KH wrote:
> On Thu, Jan 09, 2020 at 07:13:57PM +0200, Julian Stecklina wrote:
> > Now that the GVT interface to hypervisors does not depend on i915/GVT
> > internals anymore, we can move the headers to the global include/.
> > 
> > This makes out-of-tree modules for hypervisor integration possible.
> 
> What kind of out-of-tree modules do you need/want for this?

The mediated virtualization support in the i915 driver needs a backend to the
hypervisor. There is currently one backend for KVM in the tree
(drivers/gpu/drm/i915/gvt/kvmgt.c) and at least 3 other hypervisor backends out
of tree in various states of development that I know of. We are currently
developing one of these.

> 
> Also, as Christoph said, adding exports for functions that are not used
> by anything within the kernel tree itself is not ok, that's not how we
> work.

The exports are used by the KVM hypervisor backend. The patchset I sent
basically decouples KVMGT from i915 driver internals. So personally I would
count this as a benefit in itself.

There is already an indirection in place that looks like it is intended to
decouple the hypervisor backends from the i915 driver core: intel_gvt_ops. This
is a struct of function pointers that the hypervisor backend uses to talk to the
GPU mediator code.

Unfortunately, this struct doesn't cover all usecases and the KVM hypervisor
backend directly touches the i915 devices' internal state in very few places. My
current solution was to wrap these accesses in accessor functions and
EXPORT_SYMBOL_GPL them.

If the more acceptable solution is to add more function pointers to
intel_gvt_ops instead of exporting symbols, I'm happy to go along this route.

> And why do they somehow have to be out of the tree?  We want them in the
> tree, and so should you, as it will save you time and money if they are.

I also want these hypervisor backends in the tree, but from a development
workflow having the ability to build them as a out-of-tree modules is very
convenient. I guess this is also true for the developers working on the other
hypervisor backends.

When I looked at the status quo in i915/gvt a couple of weeks ago, it seemed
like it would be a win for everyone. Let me just clearly say that we have no
intention of doing binary blob drivers. :)

Thanks,
Julian

[1] 
https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/i915/gvt/gvt.h#L555


  reply	other threads:[~2020-01-16 14:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4079ce7c26a2d2a3c7e0828ed1ea6008d6e2c805.camel@cyberus-technology.de>
2020-01-09 17:13 ` [RFC PATCH 0/4] Support for out-of-tree hypervisor modules in i915/gvt Julian Stecklina
2020-01-09 17:13   ` [RFC PATCH 1/4] drm/i915/gvt: make gvt oblivious of kvmgt data structures Julian Stecklina
2020-01-20  6:22     ` Zhenyu Wang
2020-01-20  6:33       ` Zhenyu Wang
2020-01-20 17:25         ` [PATCH] " Julian Stecklina
2020-01-09 17:13   ` [RFC PATCH 2/4] drm/i915/gvt: remove unused vblank_done completion Julian Stecklina
2020-01-20  6:23     ` Zhenyu Wang
2020-01-09 17:13   ` [RFC PATCH 3/4] drm/i915/gvt: define a public interface to gvt Julian Stecklina
2020-01-09 17:13   ` [RFC PATCH 4/4] drm/i915/gvt: move public gvt headers out into global include Julian Stecklina
2020-01-15 15:22     ` Greg KH
2020-01-16 14:13       ` Julian Stecklina [this message]
2020-01-16 14:23         ` Greg KH
2020-01-16 15:05           ` Julian Stecklina
2020-01-16 19:48             ` Greg KH
2020-01-17  2:15         ` Zhenyu Wang
2020-01-14  9:18   ` [RFC PATCH 0/4] Support for out-of-tree hypervisor modules in i915/gvt Christoph Hellwig

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=9b32e225ee680e61716e300eb1ed8387599cc0dd.camel@cyberus-technology.de \
    --to=julian.stecklina@cyberus-technology.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hang.yuan@intel.com \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas.prescher@cyberus-technology.de \
    --cc=zhenyuw@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).