Hollis Blanchard | bbf45ba | 2008-04-16 23:28:09 -0500 | [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 IBM Corp. 2007 |
| 16 | * |
| 17 | * Authors: Hollis Blanchard <hollisb@us.ibm.com> |
| 18 | */ |
| 19 | |
Christian Borntraeger | dd135eb | 2008-04-02 13:04:40 -0700 | [diff] [blame] | 20 | #ifndef __LINUX_KVM_POWERPC_H |
| 21 | #define __LINUX_KVM_POWERPC_H |
| 22 | |
Jaswinder Singh Rajput | 9f2cd96 | 2009-01-31 11:44:45 +0530 | [diff] [blame] | 23 | #include <linux/types.h> |
Christian Borntraeger | dd135eb | 2008-04-02 13:04:40 -0700 | [diff] [blame] | 24 | |
Hollis Blanchard | bbf45ba | 2008-04-16 23:28:09 -0500 | [diff] [blame] | 25 | struct kvm_regs { |
| 26 | __u64 pc; |
| 27 | __u64 cr; |
| 28 | __u64 ctr; |
| 29 | __u64 lr; |
| 30 | __u64 xer; |
| 31 | __u64 msr; |
| 32 | __u64 srr0; |
| 33 | __u64 srr1; |
| 34 | __u64 pid; |
| 35 | |
| 36 | __u64 sprg0; |
| 37 | __u64 sprg1; |
| 38 | __u64 sprg2; |
| 39 | __u64 sprg3; |
| 40 | __u64 sprg4; |
| 41 | __u64 sprg5; |
| 42 | __u64 sprg6; |
| 43 | __u64 sprg7; |
| 44 | |
| 45 | __u64 gpr[32]; |
| 46 | }; |
| 47 | |
| 48 | struct kvm_sregs { |
Alexander Graf | ec3c11a | 2009-10-30 05:47:02 +0000 | [diff] [blame] | 49 | __u32 pvr; |
Alexander Graf | e15a113 | 2009-11-30 03:02:02 +0000 | [diff] [blame] | 50 | union { |
| 51 | struct { |
| 52 | __u64 sdr1; |
| 53 | struct { |
| 54 | struct { |
| 55 | __u64 slbe; |
| 56 | __u64 slbv; |
| 57 | } slb[64]; |
| 58 | } ppc64; |
| 59 | struct { |
| 60 | __u32 sr[16]; |
| 61 | __u64 ibat[8]; |
| 62 | __u64 dbat[8]; |
| 63 | } ppc32; |
| 64 | } s; |
| 65 | __u8 pad[1020]; |
| 66 | } u; |
Hollis Blanchard | bbf45ba | 2008-04-16 23:28:09 -0500 | [diff] [blame] | 67 | }; |
| 68 | |
| 69 | struct kvm_fpu { |
| 70 | __u64 fpr[32]; |
| 71 | }; |
| 72 | |
Jan Kiszka | d0bfb94 | 2008-12-15 13:52:10 +0100 | [diff] [blame] | 73 | struct kvm_debug_exit_arch { |
| 74 | }; |
| 75 | |
| 76 | /* for KVM_SET_GUEST_DEBUG */ |
| 77 | struct kvm_guest_debug_arch { |
| 78 | }; |
| 79 | |
Alexander Graf | b104d06 | 2010-02-19 11:00:29 +0100 | [diff] [blame] | 80 | #define KVM_REG_MASK 0x001f |
| 81 | #define KVM_REG_EXT_MASK 0xffe0 |
| 82 | #define KVM_REG_GPR 0x0000 |
| 83 | #define KVM_REG_FPR 0x0020 |
| 84 | #define KVM_REG_QPR 0x0040 |
| 85 | #define KVM_REG_FQPR 0x0060 |
| 86 | |
Alexander Graf | 1897876 | 2010-03-24 21:48:18 +0100 | [diff] [blame] | 87 | #define KVM_INTERRUPT_SET -1U |
| 88 | #define KVM_INTERRUPT_UNSET -2U |
Alexander Graf | 17bd158 | 2010-08-30 10:44:15 +0200 | [diff] [blame] | 89 | #define KVM_INTERRUPT_SET_LEVEL -3U |
Alexander Graf | 1897876 | 2010-03-24 21:48:18 +0100 | [diff] [blame] | 90 | |
Hollis Blanchard | bbf45ba | 2008-04-16 23:28:09 -0500 | [diff] [blame] | 91 | #endif /* __LINUX_KVM_POWERPC_H */ |