Sanjay Lal | 740765c | 2012-11-21 18:34:00 -0800 | [diff] [blame] | 1 | /* |
David Daney | 1f3dc6d | 2013-05-23 09:49:05 -0700 | [diff] [blame] | 2 | * This file is subject to the terms and conditions of the GNU General Public |
| 3 | * License. See the file "COPYING" in the main directory of this archive |
| 4 | * for more details. |
| 5 | * |
| 6 | * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. |
| 7 | * Copyright (C) 2013 Cavium, Inc. |
| 8 | * Authors: Sanjay Lal <sanjayl@kymasys.com> |
| 9 | */ |
Sanjay Lal | 740765c | 2012-11-21 18:34:00 -0800 | [diff] [blame] | 10 | |
| 11 | #ifndef __LINUX_KVM_MIPS_H |
| 12 | #define __LINUX_KVM_MIPS_H |
| 13 | |
| 14 | #include <linux/types.h> |
| 15 | |
| 16 | #define __KVM_MIPS |
| 17 | |
| 18 | #define N_MIPS_COPROC_REGS 32 |
| 19 | #define N_MIPS_COPROC_SEL 8 |
| 20 | |
David Daney | 688cded | 2013-05-23 09:49:06 -0700 | [diff] [blame] | 21 | /* |
| 22 | * for KVM_GET_REGS and KVM_SET_REGS |
| 23 | * |
| 24 | * If Config[AT] is zero (32-bit CPU), the register contents are |
| 25 | * stored in the lower 32-bits of the struct kvm_regs fields and sign |
| 26 | * extended to 64-bits. |
| 27 | */ |
Sanjay Lal | 740765c | 2012-11-21 18:34:00 -0800 | [diff] [blame] | 28 | struct kvm_regs { |
David Daney | bf32ebf | 2013-05-23 09:49:07 -0700 | [diff] [blame] | 29 | /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */ |
| 30 | __u64 gpr[32]; |
David Daney | 688cded | 2013-05-23 09:49:06 -0700 | [diff] [blame] | 31 | __u64 hi; |
| 32 | __u64 lo; |
| 33 | __u64 pc; |
Sanjay Lal | 740765c | 2012-11-21 18:34:00 -0800 | [diff] [blame] | 34 | |
| 35 | __u32 cp0reg[N_MIPS_COPROC_REGS][N_MIPS_COPROC_SEL]; |
| 36 | }; |
| 37 | |
| 38 | /* for KVM_GET_SREGS and KVM_SET_SREGS */ |
| 39 | struct kvm_sregs { |
| 40 | }; |
| 41 | |
David Daney | 1f3dc6d | 2013-05-23 09:49:05 -0700 | [diff] [blame] | 42 | /* |
| 43 | * for KVM_GET_FPU and KVM_SET_FPU |
| 44 | * |
| 45 | * If Status[FR] is zero (32-bit FPU), the upper 32-bits of the FPRs |
| 46 | * are zero filled. |
| 47 | */ |
Sanjay Lal | 740765c | 2012-11-21 18:34:00 -0800 | [diff] [blame] | 48 | struct kvm_fpu { |
David Daney | 1f3dc6d | 2013-05-23 09:49:05 -0700 | [diff] [blame] | 49 | __u64 fpr[32]; |
| 50 | __u32 fir; |
| 51 | __u32 fccr; |
| 52 | __u32 fexr; |
| 53 | __u32 fenr; |
| 54 | __u32 fcsr; |
| 55 | __u32 pad; |
Sanjay Lal | 740765c | 2012-11-21 18:34:00 -0800 | [diff] [blame] | 56 | }; |
| 57 | |
| 58 | struct kvm_debug_exit_arch { |
| 59 | }; |
| 60 | |
| 61 | /* for KVM_SET_GUEST_DEBUG */ |
| 62 | struct kvm_guest_debug_arch { |
| 63 | }; |
| 64 | |
| 65 | struct kvm_mips_interrupt { |
| 66 | /* in */ |
| 67 | __u32 cpu; |
| 68 | __u32 irq; |
| 69 | }; |
| 70 | |
| 71 | /* definition of registers in kvm_run */ |
| 72 | struct kvm_sync_regs { |
| 73 | }; |
| 74 | |
| 75 | #endif /* __LINUX_KVM_MIPS_H */ |