x86, efi: Set runtime_version to the EFI spec revision
[linux/fpc-iii.git] / arch / powerpc / include / asm / kvm_booke.h
blobb7cd3356a532d7c76d53dd9e1c418c40adb35275
1 /*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License, version 2, as
4 * published by the Free Software Foundation.
6 * This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 * GNU General Public License for more details.
11 * You should have received a copy of the GNU General Public License
12 * along with this program; if not, write to the Free Software
13 * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15 * Copyright SUSE Linux Products GmbH 2010
17 * Authors: Alexander Graf <agraf@suse.de>
20 #ifndef __ASM_KVM_BOOKE_H__
21 #define __ASM_KVM_BOOKE_H__
23 #include <linux/types.h>
24 #include <linux/kvm_host.h>
26 /* LPIDs we support with this build -- runtime limit may be lower */
27 #define KVMPPC_NR_LPIDS 64
29 static inline void kvmppc_set_gpr(struct kvm_vcpu *vcpu, int num, ulong val)
31 vcpu->arch.gpr[num] = val;
34 static inline ulong kvmppc_get_gpr(struct kvm_vcpu *vcpu, int num)
36 return vcpu->arch.gpr[num];
39 static inline void kvmppc_set_cr(struct kvm_vcpu *vcpu, u32 val)
41 vcpu->arch.cr = val;
44 static inline u32 kvmppc_get_cr(struct kvm_vcpu *vcpu)
46 return vcpu->arch.cr;
49 static inline void kvmppc_set_xer(struct kvm_vcpu *vcpu, u32 val)
51 vcpu->arch.xer = val;
54 static inline u32 kvmppc_get_xer(struct kvm_vcpu *vcpu)
56 return vcpu->arch.xer;
59 static inline u32 kvmppc_get_last_inst(struct kvm_vcpu *vcpu)
61 return vcpu->arch.last_inst;
64 static inline void kvmppc_set_ctr(struct kvm_vcpu *vcpu, ulong val)
66 vcpu->arch.ctr = val;
69 static inline ulong kvmppc_get_ctr(struct kvm_vcpu *vcpu)
71 return vcpu->arch.ctr;
74 static inline void kvmppc_set_lr(struct kvm_vcpu *vcpu, ulong val)
76 vcpu->arch.lr = val;
79 static inline ulong kvmppc_get_lr(struct kvm_vcpu *vcpu)
81 return vcpu->arch.lr;
84 static inline void kvmppc_set_pc(struct kvm_vcpu *vcpu, ulong val)
86 vcpu->arch.pc = val;
89 static inline ulong kvmppc_get_pc(struct kvm_vcpu *vcpu)
91 return vcpu->arch.pc;
94 static inline ulong kvmppc_get_fault_dar(struct kvm_vcpu *vcpu)
96 return vcpu->arch.fault_dear;
99 static inline ulong kvmppc_get_msr(struct kvm_vcpu *vcpu)
101 return vcpu->arch.shared->msr;
103 #endif /* __ASM_KVM_BOOKE_H__ */