KVM: PPC: Add PV guest scratch registers
authorAlexander Graf <agraf@suse.de>
Thu, 29 Jul 2010 12:47:50 +0000 (14:47 +0200)
committerAvi Kivity <avi@redhat.com>
Sun, 24 Oct 2010 08:50:46 +0000 (10:50 +0200)
While running in hooked code we need to store register contents out because
we must not clobber any registers.

So let's add some fields to the shared page we can just happily write to.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/powerpc/include/asm/kvm_para.h

index 4577e7b6dff112cb0eff2bce48b1810e64f893f0..5be00c9533d22a87a08c501e870cbb8c7ecfde19 100644 (file)
@@ -24,6 +24,9 @@
 #include <linux/of.h>
 
 struct kvm_vcpu_arch_shared {
+       __u64 scratch1;
+       __u64 scratch2;
+       __u64 scratch3;
        __u64 critical;         /* Guest may not get interrupts if == r1 */
        __u64 sprg0;
        __u64 sprg1;