Alexander Graf | 8c60b9f | 2010-04-16 00:11:38 +0200 | [diff] [blame] | 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 | |
Alexander Graf | 468a12c | 2011-12-09 14:44:13 +0100 | [diff] [blame] | 23 | static inline struct kvmppc_book3s_shadow_vcpu *svcpu_get(struct kvm_vcpu *vcpu) |
Alexander Graf | 8c60b9f | 2010-04-16 00:11:38 +0200 | [diff] [blame] | 24 | { |
Paul Mackerras | 3ff9550 | 2013-09-20 14:52:49 +1000 | [diff] [blame] | 25 | return vcpu->arch.shadow_vcpu; |
Alexander Graf | 8c60b9f | 2010-04-16 00:11:38 +0200 | [diff] [blame] | 26 | } |
| 27 | |
Alexander Graf | 468a12c | 2011-12-09 14:44:13 +0100 | [diff] [blame] | 28 | static inline void svcpu_put(struct kvmppc_book3s_shadow_vcpu *svcpu) |
| 29 | { |
| 30 | } |
| 31 | |
Alexander Graf | 8c60b9f | 2010-04-16 00:11:38 +0200 | [diff] [blame] | 32 | #define PTE_SIZE 12 |
| 33 | #define VSID_ALL 0 |
| 34 | #define SR_INVALID 0x00000001 /* VSID 1 should always be unused */ |
| 35 | #define SR_KP 0x20000000 |
| 36 | #define PTE_V 0x80000000 |
| 37 | #define PTE_SEC 0x00000040 |
| 38 | #define PTE_M 0x00000010 |
| 39 | #define PTE_R 0x00000100 |
| 40 | #define PTE_C 0x00000080 |
| 41 | |
| 42 | #define SID_SHIFT 28 |
| 43 | #define ESID_MASK 0xf0000000 |
| 44 | #define VSID_MASK 0x00fffffff0000000ULL |
Aneesh Kumar K.V | ce236ab | 2012-10-16 22:25:45 +0000 | [diff] [blame] | 45 | #define VPN_SHIFT 12 |
Alexander Graf | 8c60b9f | 2010-04-16 00:11:38 +0200 | [diff] [blame] | 46 | |
| 47 | #endif /* __ASM_KVM_BOOK3S_32_H__ */ |