From: Daniel Vetter <daniel@ffwll.ch>
To: Jike Song <jike.song@intel.com>
Cc: daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org
Subject: Re: [RFC PATCH 0/8] Add host i915 support for vGPU
Date: Thu, 23 Oct 2014 10:56:26 +0200 [thread overview]
Message-ID: <20141023085626.GD26941@phenom.ffwll.local> (raw)
In-Reply-To: <5448726F.60401@intel.com>
On Thu, Oct 23, 2014 at 11:13:51AM +0800, Jike Song wrote:
> On 10/22/2014 05:48 PM, Daniel Vetter wrote:
> >So on a very high level I don't understand this design. For the guest side
> >it's completely clear that we need a bunch of hooks over the driver to
> >make paravirtualization work.
> >
> >But on the host side I expect the driver to be in full control of the
> >hardware. I haven't really seen the other side but it looks like with vgt
> >we actually have two drivers fighting over the hardware, which requires
> >the various hooks to avoid disaster. The drm subsystem is littered with
> >such attempts, and they all didn't end up in a pretty way.
> >
> >So way can't we have the vgt support for guests sit on top of i915, using
> >the i915 functions to set up pagetables, contexts and reserve gtt areas
> >for the guests? Then we'd have just one driver in control of the hardware,
> >and vgt on the host side would just look like a really crazy interace
> >layer between virtual hosts and the low-level driver, similar to who the
> >execbuf ioctl is a really crazy interface between userspace and the
> >low-level driver.
>
> Yes we can do this, but that also means lots of pollution to existing i915
> codes, only for virtualization purpose. Currently vgt has pretty abstractions
> for both host i915 and guest graphics drivers, mixing vgt and host i915 means
> breaking that. I believe a vgt-integrated repository will be better to look
> at :)
The problem is that we need to have this integration anyway. Using the
current design it will be hidden behind some thin abstraction, but it will
be as invasive and fragile as if the interactions is made explicit.
Stuf like driver load/unload, suspend/resume, runtime pm and gpu reset are
already supre-fragile as-is. Every time we change something in there, a
bunch of related things fall apart. With vgt we'll have even more
complexity in there, and I really think we need to make that complexity
explicit. Otherwise we'll always break vgt support for host systems by
accident when working on upstream. So in my experience being explicit with
these depencies massively reduces maintaince headaches longterm.
Of course for starting up the vgt effort it's better to have as much
separation as possible. But the balance between development and
maintainability do change quite a bit when merging code upstream.
Another benefit of the inverted design with vgt sitting on top of normal
i915 for host support is better automated testing. At least with kvm we
could then simply create a kvm guest without any special boot parameters
and run some really basic testcases in the guest to make sure vgt doesn't
get broken. That would fit rather nicely into i-g-t. Of course with xengt
we unfortunately can't do that, since we'd need to boot with the
hypervisor.
But I think without such smoketesting in the automated upstream test suite
we'll break vgt support constantly in upstream. So I think we really need
this too, at least long term.
I hope that explains a bit where I'm coming from. Note that this is just
about the host side, imo the guest side can be merged as soon as detailed
review has been completed.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2014-10-23 8:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-30 10:05 [RFC PATCH 0/8] Add host i915 support for vGPU Jike Song
2014-09-30 10:05 ` [RFC PATCH 1/8] drm/i915: introduce a new modparam: enable_vgt Jike Song
2014-09-30 10:05 ` [RFC PATCH 2/8] drm/i915: introduce the skeleton of vgt Jike Song
2014-09-30 10:05 ` [RFC PATCH 3/8] drm/i915: add the vgt implementation of MMIO/GTT mediations Jike Song
2014-09-30 16:34 ` Tian, Kevin
2014-10-01 10:58 ` Jike Song
2014-09-30 10:05 ` [RFC PATCH 4/8] drm/i915: redirect MMIO accesses to vgt if enabled Jike Song
2014-09-30 10:05 ` [RFC PATCH 5/8] drm/i915: GTT access abstraction Jike Song
2014-09-30 10:05 ` [RFC PATCH 6/8] drm/i915: redirect GTT accesses to vgt if enabled Jike Song
2014-09-30 10:05 ` [RFC PATCH 7/8] drm/i915: vgt irq mediation - via a tasklet based mechanism Jike Song
2014-09-30 10:30 ` Daniel Vetter
2014-09-30 16:26 ` Tian, Kevin
2014-10-22 7:34 ` Jike Song
2014-10-28 6:59 ` Tian, Kevin
2014-09-30 10:05 ` [RFC PATCH 8/8] drm/i915: enable vgt if specified by module param Jike Song
2014-10-22 9:48 ` [RFC PATCH 0/8] Add host i915 support for vGPU Daniel Vetter
2014-10-23 3:13 ` Jike Song
2014-10-23 8:56 ` Daniel Vetter [this message]
2014-10-23 11:01 ` Gerd Hoffmann
2014-10-23 12:10 ` Daniel Vetter
2014-10-23 12:32 ` Gerd Hoffmann
2014-10-28 8:45 ` Tian, Kevin
2014-10-28 8:25 ` 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=20141023085626.GD26941@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jike.song@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