From: ehrhardt@linux.vnet.ibm.com
To: kvm-ppc@vger.kernel.org
Subject: [PATCH 0/6][RFC] kvmppc: paravirtualization interface - host part v3
Date: Tue, 16 Sep 2008 06:27:49 +0000 [thread overview]
Message-ID: <1221546475-15818-1-git-send-email-ehrhardt@linux.vnet.ibm.com> (raw)
In-Reply-To: <1216802207-32675-1-git-send-email-ehrhardt@linux.vnet.ibm.com>
From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Version 3 updates:
- fixed adress release at a kunmap_atomic call
- removed style issues (whitespace/indent)
- all checks to test if pvmem is currently available now use the wrappers
kvmppc_has_pvmem or kvmppc_is_pvmem
- folded some changes in a better order to prevent multiple trivial patches
for the same code sections
- the hypercall ABI is now implemented in beat style
- the rewrite of wrtee is dropped, instead mfmsr is rewritten. This saves more
exits on non cooperating guests and for now rmeoving the need for guest coop
patches (less invasive).
- separated and removed some changes unrelated to paravirtualization to
streamline this series
- changed mapping of guest memory to call gfn_to_page without mm locks held
(upstream code just changed)
- instruction rewriting is now done after emulation guarded by an unlikely()
which should save a lot of runtime complexity (adding some extra code though):
a) in non pv case this is now just an if (unlikely(x)) that is never true
b) in pv case the rewrite function does not need to be called for every
emulation - only for those that are rewritable (which additionally don't
occur anymore after being rewritten once).
This patch series implements the host part of an paravirtualization interface
using:
- the device tree mechanism to pass hypervisor informations to the guest
(kvm-userspace)
- hypercalls backend for guest->host calls
- an example exploiter of that interface (magic page) that uses that for
binary rewriting saving guest exits by avoiding privileged instructions
The device tree format used here (ºse for the discussions on
embedded-hypervisor) is the following.
- A node "hypervisor" to show the general availability of some hypervisor data
- flags for features like the example "feature,pv-magicpage"
setting 1 = available, everything else = unavailable
- Some features might need to pass more data and can use an entry in the
device tree like the example of "data,pv-magicpage-size"
If the guest wants that pv support it has to allocate the requested size of
memory (aligned to the tlb entry size rounded up => e.g. 4000 bytes 4k
aligned, 4096 bytes 4k aligned, 4097 bytes 16k aligned and so on).
The speedup with both patch queues applied is around 40% dependent on what the
guest is doing (measured with boot times and some simple tasks). The raw saving
of exits about ~50-60% as you can see in the kvm stat exit counters.
[patches in series]
[PATCH 1/6] kvmppc: add hypercall infrastructure - host part
[PATCH 2/6] kvmppc: magic page hypercall - host part
[PATCH 3/6] kvmppc: rewrite guest code - sprg0-3
[PATCH 4/6] kvmppc: rewrite guest code - dear, esr, srr0, srr1
[PATCH 5/6] kvmppc: rewrite guest code - mfmsr
[PATCH 6/6] kvmppc: kvm-userspace: device tree modification for magic page
---
[diffstat]
kernel:
arch/powerpc/kvm/booke_guest.c | 70 ++++-
arch/powerpc/kvm/emulate.c | 415 ++++++++++++++++++++++++++++++++--
b/arch/powerpc/kvm/booke_guest.c | 11
b/arch/powerpc/kvm/booke_interrupts.S | 9
b/arch/powerpc/kvm/emulate.c | 16 +
b/arch/powerpc/kvm/powerpc.c | 20 +
b/include/asm-powerpc/kvm_host.h | 1
b/include/asm-powerpc/kvm_para.h | 4
b/include/asm-powerpc/kvm_ppc.h | 3
b/include/linux/kvm.h | 5
include/asm-powerpc/kvm_host.h | 5
include/asm-powerpc/kvm_para.h | 54 ++++
kvm-userspace:
b/libkvm/libkvm-powerpc.c | 6
b/libkvm/libkvm.h | 4
b/qemu/hw/device_tree.c | 10
b/qemu/hw/device_tree.h | 1
b/qemu/hw/ppc440_bamboo.c | 18 +
b/qemu/qemu-kvm-powerpc.c | 5
b/qemu/qemu-kvm.h | 1
19 files changed, 625 insertions(+), 33 deletions(-)
prev parent reply other threads:[~2008-09-16 6:27 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-23 8:36 [PATCH 0/6][RFC] kvmppc: paravirtualization interface ehrhardt
2008-07-23 8:36 ` ehrhardt
2008-07-23 8:36 ` [PATCH 1/6] kvmppc: read device tree hypervisor node infrastructure ehrhardt
2008-07-23 8:36 ` ehrhardt
2008-07-24 1:41 ` Tony Breeds
2008-07-24 1:41 ` Tony Breeds
2008-07-24 7:44 ` Christian Ehrhardt
2008-07-24 7:44 ` Christian Ehrhardt
2008-07-23 8:36 ` [PATCH 2/6] kvmppc: add hypercall infrastructure - host part ehrhardt
2008-07-23 8:36 ` ehrhardt
2008-07-24 1:43 ` Tony Breeds
2008-07-24 1:43 ` Tony Breeds
2008-07-30 13:41 ` Geert Uytterhoeven
2008-07-30 13:41 ` Geert Uytterhoeven
2008-07-23 8:36 ` [PATCH 3/6] kvmppc: add hypercall infrastructure - guest part ehrhardt
2008-07-23 8:36 ` ehrhardt
2008-07-24 1:45 ` Tony Breeds
2008-07-24 1:45 ` Tony Breeds
2008-07-24 7:56 ` Christian Ehrhardt
2008-07-24 7:56 ` Christian Ehrhardt
2008-07-23 8:36 ` [PATCH 4/6] kvmppc: magic page hypercall - host part ehrhardt
2008-07-23 8:36 ` ehrhardt
2008-07-24 1:49 ` Tony Breeds
2008-07-24 1:49 ` Tony Breeds
2008-07-23 8:36 ` [PATCH 5/6] kvmppc: magic page paravirtualization - guest part ehrhardt
2008-07-23 8:36 ` ehrhardt
2008-07-24 1:59 ` Tony Breeds
2008-07-24 1:59 ` Tony Breeds
2008-07-23 8:36 ` [PATCH 6/6] kvmppc: kvm-userspace: device tree modification for magicpage ehrhardt
2008-07-23 8:36 ` ehrhardt
2008-07-24 2:01 ` [PATCH 0/6][RFC] kvmppc: paravirtualization interface Tony Breeds
2008-07-24 2:01 ` Tony Breeds
2008-07-24 8:17 ` Christian Ehrhardt
2008-07-24 8:17 ` Christian Ehrhardt
2008-07-25 1:08 ` Tony Breeds
2008-07-25 1:08 ` Tony Breeds
2008-08-19 10:36 ` [PATCH 0/6][RFC] kvmppc: paravirtualization interface - host part v2 ehrhardt
2008-09-16 6:27 ` ehrhardt [this message]
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=1221546475-15818-1-git-send-email-ehrhardt@linux.vnet.ibm.com \
--to=ehrhardt@linux.vnet.ibm.com \
--cc=kvm-ppc@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.