Re: [PATCH 00/27] KVM PPC PV framework v3
From: Alexander Graf <hidden>
Date: 2010-08-01 20:21:40
Also in:
kvm
On 01.08.2010, at 16:02, Avi Kivity wrote:
On 07/29/2010 03:47 PM, Alexander Graf wrote:quoted
On PPC we run PR=3D0 (kernel mode) code in PR=3D1 (user mode) and =
don't use the
quoted
hypervisor extensions. =20 While that is all great to show that virtualization is possible, =
there are
quoted
quite some cases where the emulation overhead of privileged =
instructions is
quoted
killing performance. =20 This patchset tackles exactly that issue. It introduces a paravirtual =
framework
quoted
using which KVM and Linux share a page to exchange register state =
with. That
quoted
way we don't have to switch to the hypervisor just to change a value =
of a
quoted
privileged register. =20 To prove my point, I ran the same test I did for the MMU =
optimizations against
quoted
the PV framework. Here are the results: =20 [without] =20 debian-powerpc:~# time for i in {1..1000}; do /bin/echo hello> =
/dev/null; done
quoted
=20 real 0m14.659s user 0m8.967s sys 0m5.688s =20 [with] =20 debian-powerpc:~# time for i in {1..1000}; do /bin/echo hello> =
/dev/null; done
quoted
=20 real 0m7.557s user 0m4.121s sys 0m3.426s =20 =20 So this is a significant performance improvement! I'm quite happy how =
fast this
quoted
whole thing becomes :) =20 I tried to take all comments I've heard from people so far about such =
a PV
quoted
framework into account. In case you told me something before that is =
a no-go
quoted
and I still did it, please just tell me again. =20 To make use of this whole thing you also need patches to qemu and =
openbios. I
quoted
have them in my queue, but want to see this set upstream first before =
I start
quoted
sending patches to the other projects. =20 Now go and have fun with fast VMs on PPC! Get yourself a G5 on ebay =
and start
quoted
experiencing the power yourself. - heh =20 v1 -> v2: =20 - change hypervisor calls to use r0 and r3 - make crit detection only trigger in supervisor mode - RMO -> PAM - introduce kvm_patch_ins - only flush icache when patching - introduce kvm_patch_ins_b - update documentation =20 v2 -> v3: =20 - use pPAPR conventions for hypercall interface - only use r0 as magic sc number - remove PVR detection - remove BookE shared page mapping support - combine book3s-64 and -32 magic page ra override - add self-test check if the mapping works to guest code - add safety check for relocatable kernels =20=20 Looks reasonable. Since it's fair to say I understand nothing about =
powerpc, I'd like someone who does to review it and ack, please, with an = emphasis on the interfaces. Sounds good. Preferably someone with access to the ePAPR spec :). Alex