Patchwork [09/27] KVM: PPC: Add PV guest scratch registers

login
register
mail settings
Submitter Alexander Graf
Date July 29, 2010, 12:47 p.m.
Message ID <1280407688-9815-10-git-send-email-agraf@suse.de>
Download mbox | patch
Permalink /patch/60240/
State Not Applicable
Headers show

Comments

Alexander Graf - July 29, 2010, 12:47 p.m.
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>
---
 arch/powerpc/include/asm/kvm_para.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Patch

diff --git a/arch/powerpc/include/asm/kvm_para.h b/arch/powerpc/include/asm/kvm_para.h
index 4577e7b..5be00c9 100644
--- a/arch/powerpc/include/asm/kvm_para.h
+++ b/arch/powerpc/include/asm/kvm_para.h
@@ -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;