KVM: PPC: Enable lightweight exits again
authorAlexander Graf <agraf@suse.de>
Mon, 4 Jan 2010 21:19:25 +0000 (22:19 +0100)
committerMarcelo Tosatti <mtosatti@redhat.com>
Mon, 1 Mar 2010 15:35:46 +0000 (12:35 -0300)
commit97c4cfbe890a4ad82dde8660008d42b7b05dc488
tree9efc0daf1ec644291a10e8e6c91ff212f91732e1
parentb480f780f071a068810ccd0e49c1daa210bfbeab
KVM: PPC: Enable lightweight exits again

The PowerPC C ABI defines that registers r14-r31 need to be preserved across
function calls. Since our exit handler is written in C, we can make use of that
and don't need to reload r14-r31 on every entry/exit cycle.

This technique is also used in the BookE code and is called "lightweight exits"
there. To follow the tradition, it's called the same in Book3S.

So far this optimization was disabled though, as the code didn't do what it was
expected to do, but failed to work.

This patch fixes and enables lightweight exits again.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/powerpc/kvm/book3s.c
arch/powerpc/kvm/book3s_64_interrupts.S