public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Stuart Yoder <b08248@gmail.com>
Cc: Kun Wang <wangkun@cn.ibm.com>,
	kvm-ppc@vger.kernel.org,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	Scott Wood <scottwood@freescale.com>,
	Alexander Graf <agraf@suse.de>
Subject: Re: KVM on IBM PowerEN processor
Date: Mon, 12 Sep 2011 07:59:09 -0300	[thread overview]
Message-ID: <1315825149.455.101.camel@pasglop> (raw)
In-Reply-To: <CALRxmdB6KkKhQ1huJGgh4saxA+cU=wTk-AHA=iFPGn_-L8vO7g@mail.gmail.com>

On Tue, 2011-08-30 at 09:15 -0500, Stuart Yoder wrote:
> Also, note--  we (Freescale) do have a patchset coming soon for the e500mc
> which is a 2.06 embedded 32-bit CPU with category E.HV.    We've had this
> running for a while and are close to finishing some cleanup before posting
> upstream.  We are are also starting to look at 64-bit support for our e5500
> CPU we should be a delta on top of the e500mc support.
> 
> Just want to make you aware of some current work that may overlap your
> A2 KVM support... 

The main difference will be the MMU version (FSL is MAV1, A2 is MAV2),
and overall TLB structure.

The rest should be mostly identical :-)

I suspect the TLB virtualization code will be quite different, but it's
really going to depend what approach Kun decides to use.

You can probably start with doing simple SW load, but performance will
suck.

Other options that I've been thinking about to try to exploit indirect
TLB entries (HW load) in no specific order:

 - Use the LRAT. (How ? It's small, meant for huge translations ...
maybe on top of some large part support & demand fault it using a
really short asm code path ? Some kind of linear array of 16M
translations like we do on power7 KVM ?). Using the LRAT means that you
enable the guest direct use of indirect TLB.

 - Shadow page tables. Paravirtualize (or emulate) insertion of indirect
entries and have the HV maintain pre-translated shadows. That means all
page faults must go to KVM though, in order to handle protection
changes, and you need some reverse mapping to be able to deal with
invalidations, unless you "trick" with paravirt rather than full virt,
such as notifying KVM when you populate a PTE.

 - Like the above but additionally have KVM walk the guest page tables
directly and only forward to the guest actual PTE faults. Might require
some kind of hcall to tell kvm about the root of the tree (roots
actually) on context switch etc... might not be worth it but may also
save you overhead.

Cheers,
Ben.

  parent reply	other threads:[~2011-09-12 10:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <OF86ED43B5.E5B63A29-ON482578FB.00344CC1-482578FB.00344AEB@cn.ibm.com>
2011-08-30  9:45 ` KVM on IBM PowerEN processor Alexander Graf
2011-08-30 14:15   ` Stuart Yoder
2011-08-30 16:31     ` Kun Wang
2011-09-12 12:18       ` Caraman Mihai Claudiu-B02008
2011-09-12 10:59     ` Benjamin Herrenschmidt [this message]
2011-08-30 16:49   ` Kun Wang

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=1315825149.455.101.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=agraf@suse.de \
    --cc=b08248@gmail.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=scottwood@freescale.com \
    --cc=wangkun@cn.ibm.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