intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Jike Song <jike.song@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: "White, Michael L" <michael.l.white@intel.com>,
	"Cowperthwaite, David J" <david.j.cowperthwaite@intel.com>,
	"Li, Susie" <susie.li@intel.com>,
	"Dong, Eddie" <eddie.dong@intel.com>,
	"Haron, Sandra" <sandra.haron@intel.com>
Subject: Re: [ANNOUNCE][RFC] KVMGT - the implementation of Intel GVT-g(full GPU virtualization) for KVM
Date: Tue, 09 Dec 2014 10:54:18 +0100	[thread overview]
Message-ID: <5486C6CA.8080006@siemens.com> (raw)
In-Reply-To: <547FC5DE.4010701@intel.com>

On 2014-12-04 03:24, Jike Song wrote:
> Hi all,
> 
>  We are pleased to announce the first release of KVMGT project. KVMGT is
> the implementation of Intel GVT-g technology, a full GPU virtualization
> solution. Under Intel GVT-g, a virtual GPU instance is maintained for
> each VM, with part of performance critical resources directly assigned.
> The capability of running native graphics driver inside a VM, without
> hypervisor intervention in performance critical paths, achieves a good
> balance of performance, feature, and sharing capability.
> 
> 
>  KVMGT is still in the early stage:
> 
>   - Basic functions of full GPU virtualization works, guest can see a
> full-featured vGPU.
>     We ran several 3D workloads such as lightsmark, nexuiz, urbanterror
> and warsow.
> 
>   - Only Linux guest supported so far, and PPGTT must be disabled in
> guest through a
>     kernel parameter(see README.kvmgt in QEMU).
> 
>   - This drop also includes some Xen specific changes, which will be
> cleaned up later.
> 
>   - Our end goal is to upstream both XenGT and KVMGT, which shares ~90%
> logic for vGPU
>     device model (will be part of i915 driver), with only difference in
> hypervisor
>     specific services
> 
>   - insufficient test coverage, so please bear with stability issues :)
> 
> 
> 
>  There are things need to be improved, esp. the KVM interfacing part:
> 
>     1    a domid was added to each KVMGT guest
> 
>         An ID is needed for foreground OS switching, e.g.
> 
>             # echo <domid>    >    /sys/kernel/vgt/control/foreground_vm
> 
>         domid 0 is reserved for host OS.
> 
> 
>      2    SRCU workarounds.
> 
>         Some KVM functions, such as:
> 
>                 kvm_io_bus_register_dev
>                 install_new_memslots
> 
>         must be called *without* &kvm->srcu read-locked. Otherwise it
> hangs.
> 
>         In KVMGT, we need to register an iodev only *after* BAR
> registers are
>         written by guest. That means, we already have &kvm->srcu hold -
>         trapping/emulating PIO(BAR registers) makes us in such a condition.
>         That will make kvm_io_bus_register_dev hangs.
> 
>         Currently we have to disable rcu_assign_pointer() in such
> functions.
> 
>         These were dirty workarounds, your suggestions are high welcome!
> 
> 
>     3    syscalls were called to access "/dev/mem" from kernel
> 
>         An in-kernel memslot was added for aperture, but using syscalls
> like
>         open and mmap to open and access the character device "/dev/mem",
>         for pass-through.
> 
>  
> 
> 
> The source codes(kernel, qemu as well as seabios) are available at github:
> 
>     git://github.com/01org/KVMGT-kernel
>     git://github.com/01org/KVMGT-qemu
>     git://github.com/01org/KVMGT-seabios
> 
> In the KVMGT-qemu repository, there is a "README.kvmgt" to be referred.
> 
> 
> 
> More information about Intel GVT-g and KVMGT can be found at:
> 
>     https://www.usenix.org/conference/atc14/technical-sessions/presentation/tian
> 
>     http://events.linuxfoundation.org/sites/events/files/slides/KVMGT-a%20Full%20GPU%20Virtualization%20Solution_1.pdf
> 
> 
> 
> Appreciate your comments, BUG reports, and contributions!
> 

There is an even increasing interest to keep KVM's in-kernel guest
interface as small as possible, specifically for security reasons. I'm
sure there are some good performance reasons to create a new in-kernel
device model, but I suppose those will need good evidences why things
are done in the way they finally should be - and not via a user-space
device model. This is likely not a binary decision (all userspace vs. no
userspace), it is more about the size and robustness of the in-kernel
model vs. its performance.

One aspect could also be important: Are there hardware improvements in
sight that will eventually help to reduce the in-kernel device model and
make the overall design even more robust? How will those changes fit
best into a proposed user/kernel split?

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux

  parent reply	other threads:[~2014-12-09  9:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-04  2:24 [ANNOUNCE][RFC] KVMGT - the implementation of Intel GVT-g(full GPU virtualization) for KVM Jike Song
2014-12-04 19:56 ` Igor Gnatenko
2014-12-05  8:50 ` Gerd Hoffmann
2014-12-05 13:03   ` Paolo Bonzini
2014-12-06  4:30     ` Jike Song
2014-12-09  2:49     ` Tian, Kevin
2014-12-10 16:59       ` Paolo Bonzini
2014-12-11  0:33         ` Tian, Kevin
2014-12-11  1:38           ` Paolo Bonzini
2014-12-05 13:54   ` Daniel Vetter
2014-12-06  4:32     ` Jike Song
2014-12-06  4:17   ` Jike Song
2014-12-08  9:55     ` Gerd Hoffmann
2014-12-08 10:20       ` Daniel Vetter
2014-12-09  2:51         ` Tian, Kevin
2014-12-09  9:54 ` Jan Kiszka [this message]
2014-12-10  6:31   ` Jike Song
2014-12-10  6:34   ` Jike Song
2014-12-10  7:28     ` Tian, Kevin
2015-10-27  9:36 ` Jike Song
2016-01-27  6:32   ` [ANNOUNCE] 2015-Q4 release of KVMGT (Was Re: KVMGT - the implementation of ...) Jike Song
2016-04-16  6:31     ` [ANNOUNCE] 2016-Q1 " Jike Song
2016-07-20  4:52       ` [ANNOUNCE] 2016-Q2 " Jike Song
2016-11-06 15:23         ` [ANNOUNCE] 2016-Q3 " Jike Song

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=5486C6CA.8080006@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=david.j.cowperthwaite@intel.com \
    --cc=eddie.dong@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jike.song@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.l.white@intel.com \
    --cc=sandra.haron@intel.com \
    --cc=susie.li@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).