diff options
author | Alexander Graf <agraf@suse.de> | 2010-04-15 18:11:38 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-05-17 05:18:23 -0400 |
commit | 8c60b9fb0f9dca8adb0143456245041e7a036c2f (patch) | |
tree | f9dd2c20404584c056643255b86dd275af236689 /arch/powerpc | |
parent | 3ae07890dd40e40fa78270900894fba3bb448439 (diff) |
KVM: PPC: Add kvm_book3s_32.h
In analogy to the 64 bit specific header file, this is the 32 bit
pendant. With this in place we can just always call to_svcpu and
be assured we get the right pointer anywhere.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/include/asm/kvm_book3s_32.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_book3s_32.h b/arch/powerpc/include/asm/kvm_book3s_32.h new file mode 100644 index 000000000000..de604db135f5 --- /dev/null +++ b/arch/powerpc/include/asm/kvm_book3s_32.h | |||
@@ -0,0 +1,42 @@ | |||
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. | ||
5 | * | ||
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. | ||
10 | * | ||
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. | ||
14 | * | ||
15 | * Copyright SUSE Linux Products GmbH 2010 | ||
16 | * | ||
17 | * Authors: Alexander Graf <agraf@suse.de> | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_KVM_BOOK3S_32_H__ | ||
21 | #define __ASM_KVM_BOOK3S_32_H__ | ||
22 | |||
23 | static inline struct kvmppc_book3s_shadow_vcpu *to_svcpu(struct kvm_vcpu *vcpu) | ||
24 | { | ||
25 | return to_book3s(vcpu)->shadow_vcpu; | ||
26 | } | ||
27 | |||
28 | #define PTE_SIZE 12 | ||
29 | #define VSID_ALL 0 | ||
30 | #define SR_INVALID 0x00000001 /* VSID 1 should always be unused */ | ||
31 | #define SR_KP 0x20000000 | ||
32 | #define PTE_V 0x80000000 | ||
33 | #define PTE_SEC 0x00000040 | ||
34 | #define PTE_M 0x00000010 | ||
35 | #define PTE_R 0x00000100 | ||
36 | #define PTE_C 0x00000080 | ||
37 | |||
38 | #define SID_SHIFT 28 | ||
39 | #define ESID_MASK 0xf0000000 | ||
40 | #define VSID_MASK 0x00fffffff0000000ULL | ||
41 | |||
42 | #endif /* __ASM_KVM_BOOK3S_32_H__ */ | ||