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 | |
| 21 | /* for KVM_GET_REGS and KVM_SET_REGS */ |
| 22 | struct kvm_regs { |
| 23 | __u32 gprs[32]; |
| 24 | __u32 hi; |
| 25 | __u32 lo; |
| 26 | __u32 pc; |
| 27 | |
| 28 | __u32 cp0reg[N_MIPS_COPROC_REGS][N_MIPS_COPROC_SEL]; |
| 29 | }; |
| 30 | |
| 31 | /* for KVM_GET_SREGS and KVM_SET_SREGS */ |
| 32 | struct kvm_sregs { |
| 33 | }; |
| 34 | |
David Daney | 1f3dc6d | 2013-05-23 09:49:05 -0700 | [diff] [blame^] | 35 | /* |
| 36 | * for KVM_GET_FPU and KVM_SET_FPU |
| 37 | * |
| 38 | * If Status[FR] is zero (32-bit FPU), the upper 32-bits of the FPRs |
| 39 | * are zero filled. |
| 40 | */ |
Sanjay Lal | 740765c | 2012-11-21 18:34:00 -0800 | [diff] [blame] | 41 | struct kvm_fpu { |
David Daney | 1f3dc6d | 2013-05-23 09:49:05 -0700 | [diff] [blame^] | 42 | __u64 fpr[32]; |
| 43 | __u32 fir; |
| 44 | __u32 fccr; |
| 45 | __u32 fexr; |
| 46 | __u32 fenr; |
| 47 | __u32 fcsr; |
| 48 | __u32 pad; |
Sanjay Lal | 740765c | 2012-11-21 18:34:00 -0800 | [diff] [blame] | 49 | }; |
| 50 | |
| 51 | struct kvm_debug_exit_arch { |
| 52 | }; |
| 53 | |
| 54 | /* for KVM_SET_GUEST_DEBUG */ |
| 55 | struct kvm_guest_debug_arch { |
| 56 | }; |
| 57 | |
| 58 | struct kvm_mips_interrupt { |
| 59 | /* in */ |
| 60 | __u32 cpu; |
| 61 | __u32 irq; |
| 62 | }; |
| 63 | |
| 64 | /* definition of registers in kvm_run */ |
| 65 | struct kvm_sync_regs { |
| 66 | }; |
| 67 | |
| 68 | #endif /* __LINUX_KVM_MIPS_H */ |