]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: PV assembler helpers
authorAlexander Graf <agraf@suse.de>
Thu, 29 Jul 2010 12:48:03 +0000 (14:48 +0200)
committerAvi Kivity <avi@redhat.com>
Sun, 24 Oct 2010 08:50:55 +0000 (10:50 +0200)
commite927a3d25fc0d224a27841d566ea2d071338f95c
tree482fac5bdebbe2b19cda8a2575e3805d99f23310
parentdd7fc991491325c57cc3095ab56f18bb4f33b202
KVM: PPC: PV assembler helpers

When we hook an instruction we need to make sure we don't clobber any of
the registers at that point. So we write them out to scratch space in the
magic page. To make sure we don't fall into a race with another piece of
hooked code, we need to disable interrupts.

To make the later patches and code in general easier readable, let's introduce
a set of defines that save and restore r30, r31 and cr. Let's also define some
helpers to read the lower 32 bits of a 64 bit field on 32 bit systems.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/powerpc/kernel/kvm_emul.S