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: Wed, 22 Oct 2014 11:48:32 +0200 [thread overview]
Message-ID: <20141022094832.GS26941@phenom.ffwll.local> (raw)
In-Reply-To: <1412071538-19059-1-git-send-email-jike.song@intel.com>
On Tue, Sep 30, 2014 at 06:05:30PM +0800, Jike Song wrote:
> Intel GVT-g (previously known as XenGT), is a complete GPU
> virtualization solution with mediated pass-through for 4th
> generation Intel Core processors - Haswell platform. This
> technology presents a virtual full-fledged GPU to each Virtual
> Machine (VM). VMs can directly access performance-critical
> resources, without intervention from the hypervisor in most
> cases, while privileged operations from VMs are trap-and-emulated
> at minimal cost. For details, please refer to:
>
> https://01.org/xen/blogs/wangbo85/2014/intel-gvt-gxengt-pubic-release
>
> The patches of adding vGPU guest support for i915, is already posted at:
>
> http://lists.freedesktop.org/archives/intel-gfx/2014-September/052571.html
>
>
> This patch set is about to add vGPU host support.
>
> When running as vGPU host, the i915 driver can't simply occupy
> the whole GPU resources, it needs to proactively meidate the
> accesses to most hardware resources: MMIO, GTT, and interrupt.
> Only by handling the hardware resources, the vgt can have
> centralized management about sharing between VMs(including
> host and guest).
>
>
> This patch set adds:
>
> - an i915 extension, named vgt. vgt is the major part of Intel
> GVT-g implementation, it manages and shares GPU among VMs
> and host;
>
> - interfaces between i915 and vgt, including:
>
> Mediated MMIO access
> Mediated GTT access
> Mediated IRQ handling
>
> NOTE of RFC:
>
> - the vgt in-kernel GPU device-model is not yet integrated, though
> the interfaces between i915 and vgt are provided;
>
> - the host i915 driver has some logic same with the guest i915,
> e.g. the ballooning. When the guest patches(see above) are
> finalized, we need to rebase upon them;
>
> - vgt_suspend/vgt_resume are still under cleanup;
>
> - GPU reset is still under cleanup
>
>
> We send out the framework changes in this patch set for review
> at first, and meanwhile, vgt integration and cleanup are ongoing.
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.
Cheers, 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-22 9:48 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 ` Daniel Vetter [this message]
2014-10-23 3:13 ` [RFC PATCH 0/8] Add host i915 support for vGPU Jike Song
2014-10-23 8:56 ` Daniel Vetter
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=20141022094832.GS26941@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