diff options
author | Varun Sethi <Varun.Sethi@freescale.com> | 2012-04-25 01:26:43 +0000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2012-05-06 16:19:08 +0200 |
commit | 185e4188dab6456409cad66c579501dd89487188 (patch) | |
tree | f9d57c7a37d12de21667fdd11312ee5559820c2b /arch/powerpc/include/asm/kvm_asm.h | |
parent | 6e35994d1f6831af1e5577e28c363c9137d7d597 (diff) |
KVM: PPC: bookehv: Use a Macro for saving/restoring guest registers to/from their 64 bit copies.
Introduced PPC_STD/PPC_LD macros for saving/restoring guest registers to/from their 64 bit copies.
Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/include/asm/kvm_asm.h')
-rw-r--r-- | arch/powerpc/include/asm/kvm_asm.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_asm.h b/arch/powerpc/include/asm/kvm_asm.h index 09781523328..7d4018dd0e1 100644 --- a/arch/powerpc/include/asm/kvm_asm.h +++ b/arch/powerpc/include/asm/kvm_asm.h @@ -20,6 +20,14 @@ #ifndef __POWERPC_KVM_ASM_H__ #define __POWERPC_KVM_ASM_H__ +#ifdef CONFIG_64BIT +#define PPC_STD(sreg, offset, areg) std sreg, (offset)(areg) +#define PPC_LD(treg, offset, areg) ld treg, (offset)(areg) +#else +#define PPC_STD(sreg, offset, areg) stw sreg, (offset+4)(areg) +#define PPC_LD(treg, offset, areg) lwz treg, (offset+4)(areg) +#endif + /* IVPR must be 64KiB-aligned. */ #define VCPU_SIZE_ORDER 4 #define VCPU_SIZE_LOG (VCPU_SIZE_ORDER + 12) |