diff options
author | David S. Miller <davem@davemloft.net> | 2013-06-05 18:56:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-05 19:37:30 -0400 |
commit | 6bc19fb82d4c05a9eee19d6d2aab2ce26e499ec2 (patch) | |
tree | 8b049ef383307f5dae91b5c9cf78dbfb9b74a4d1 /arch/mips/include/uapi/asm/kvm.h | |
parent | 11a164a04382d735230b01f4cc46ad78a7c4abf6 (diff) | |
parent | 4d3797d7e1861ac1af150a6189315786c5e1c820 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Merge 'net' bug fixes into 'net-next' as we have patches
that will build on top of them.
This merge commit includes a change from Emil Goode
(emilgoode@gmail.com) that fixes a warning that would
have been introduced by this merge. Specifically it
fixes the pingv6_ops method ipv6_chk_addr() to add a
"const" to the "struct net_device *dev" argument and
likewise update the dummy_ipv6_chk_addr() declaration.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/mips/include/uapi/asm/kvm.h')
-rw-r--r-- | arch/mips/include/uapi/asm/kvm.h | 137 |
1 files changed, 110 insertions, 27 deletions
diff --git a/arch/mips/include/uapi/asm/kvm.h b/arch/mips/include/uapi/asm/kvm.h index 85789eacbf18..3f424f5217da 100644 --- a/arch/mips/include/uapi/asm/kvm.h +++ b/arch/mips/include/uapi/asm/kvm.h | |||
@@ -1,55 +1,138 @@ | |||
1 | /* | 1 | /* |
2 | * This file is subject to the terms and conditions of the GNU General Public | 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 | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. | 6 | * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. |
7 | * Authors: Sanjay Lal <sanjayl@kymasys.com> | 7 | * Copyright (C) 2013 Cavium, Inc. |
8 | */ | 8 | * Authors: Sanjay Lal <sanjayl@kymasys.com> |
9 | */ | ||
9 | 10 | ||
10 | #ifndef __LINUX_KVM_MIPS_H | 11 | #ifndef __LINUX_KVM_MIPS_H |
11 | #define __LINUX_KVM_MIPS_H | 12 | #define __LINUX_KVM_MIPS_H |
12 | 13 | ||
13 | #include <linux/types.h> | 14 | #include <linux/types.h> |
14 | 15 | ||
15 | #define __KVM_MIPS | 16 | /* |
16 | 17 | * KVM MIPS specific structures and definitions. | |
17 | #define N_MIPS_COPROC_REGS 32 | 18 | * |
18 | #define N_MIPS_COPROC_SEL 8 | 19 | * Some parts derived from the x86 version of this file. |
20 | */ | ||
19 | 21 | ||
20 | /* for KVM_GET_REGS and KVM_SET_REGS */ | 22 | /* |
23 | * for KVM_GET_REGS and KVM_SET_REGS | ||
24 | * | ||
25 | * If Config[AT] is zero (32-bit CPU), the register contents are | ||
26 | * stored in the lower 32-bits of the struct kvm_regs fields and sign | ||
27 | * extended to 64-bits. | ||
28 | */ | ||
21 | struct kvm_regs { | 29 | struct kvm_regs { |
22 | __u32 gprs[32]; | 30 | /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */ |
23 | __u32 hi; | 31 | __u64 gpr[32]; |
24 | __u32 lo; | 32 | __u64 hi; |
25 | __u32 pc; | 33 | __u64 lo; |
26 | 34 | __u64 pc; | |
27 | __u32 cp0reg[N_MIPS_COPROC_REGS][N_MIPS_COPROC_SEL]; | ||
28 | }; | ||
29 | |||
30 | /* for KVM_GET_SREGS and KVM_SET_SREGS */ | ||
31 | struct kvm_sregs { | ||
32 | }; | 35 | }; |
33 | 36 | ||
34 | /* for KVM_GET_FPU and KVM_SET_FPU */ | 37 | /* |
38 | * for KVM_GET_FPU and KVM_SET_FPU | ||
39 | * | ||
40 | * If Status[FR] is zero (32-bit FPU), the upper 32-bits of the FPRs | ||
41 | * are zero filled. | ||
42 | */ | ||
35 | struct kvm_fpu { | 43 | struct kvm_fpu { |
44 | __u64 fpr[32]; | ||
45 | __u32 fir; | ||
46 | __u32 fccr; | ||
47 | __u32 fexr; | ||
48 | __u32 fenr; | ||
49 | __u32 fcsr; | ||
50 | __u32 pad; | ||
36 | }; | 51 | }; |
37 | 52 | ||
53 | |||
54 | /* | ||
55 | * For MIPS, we use KVM_SET_ONE_REG and KVM_GET_ONE_REG to access CP0 | ||
56 | * registers. The id field is broken down as follows: | ||
57 | * | ||
58 | * bits[2..0] - Register 'sel' index. | ||
59 | * bits[7..3] - Register 'rd' index. | ||
60 | * bits[15..8] - Must be zero. | ||
61 | * bits[63..16] - 1 -> CP0 registers. | ||
62 | * | ||
63 | * Other sets registers may be added in the future. Each set would | ||
64 | * have its own identifier in bits[63..16]. | ||
65 | * | ||
66 | * The addr field of struct kvm_one_reg must point to an aligned | ||
67 | * 64-bit wide location. For registers that are narrower than | ||
68 | * 64-bits, the value is stored in the low order bits of the location, | ||
69 | * and sign extended to 64-bits. | ||
70 | * | ||
71 | * The registers defined in struct kvm_regs are also accessible, the | ||
72 | * id values for these are below. | ||
73 | */ | ||
74 | |||
75 | #define KVM_REG_MIPS_R0 0 | ||
76 | #define KVM_REG_MIPS_R1 1 | ||
77 | #define KVM_REG_MIPS_R2 2 | ||
78 | #define KVM_REG_MIPS_R3 3 | ||
79 | #define KVM_REG_MIPS_R4 4 | ||
80 | #define KVM_REG_MIPS_R5 5 | ||
81 | #define KVM_REG_MIPS_R6 6 | ||
82 | #define KVM_REG_MIPS_R7 7 | ||
83 | #define KVM_REG_MIPS_R8 8 | ||
84 | #define KVM_REG_MIPS_R9 9 | ||
85 | #define KVM_REG_MIPS_R10 10 | ||
86 | #define KVM_REG_MIPS_R11 11 | ||
87 | #define KVM_REG_MIPS_R12 12 | ||
88 | #define KVM_REG_MIPS_R13 13 | ||
89 | #define KVM_REG_MIPS_R14 14 | ||
90 | #define KVM_REG_MIPS_R15 15 | ||
91 | #define KVM_REG_MIPS_R16 16 | ||
92 | #define KVM_REG_MIPS_R17 17 | ||
93 | #define KVM_REG_MIPS_R18 18 | ||
94 | #define KVM_REG_MIPS_R19 19 | ||
95 | #define KVM_REG_MIPS_R20 20 | ||
96 | #define KVM_REG_MIPS_R21 21 | ||
97 | #define KVM_REG_MIPS_R22 22 | ||
98 | #define KVM_REG_MIPS_R23 23 | ||
99 | #define KVM_REG_MIPS_R24 24 | ||
100 | #define KVM_REG_MIPS_R25 25 | ||
101 | #define KVM_REG_MIPS_R26 26 | ||
102 | #define KVM_REG_MIPS_R27 27 | ||
103 | #define KVM_REG_MIPS_R28 28 | ||
104 | #define KVM_REG_MIPS_R29 29 | ||
105 | #define KVM_REG_MIPS_R30 30 | ||
106 | #define KVM_REG_MIPS_R31 31 | ||
107 | |||
108 | #define KVM_REG_MIPS_HI 32 | ||
109 | #define KVM_REG_MIPS_LO 33 | ||
110 | #define KVM_REG_MIPS_PC 34 | ||
111 | |||
112 | /* | ||
113 | * KVM MIPS specific structures and definitions | ||
114 | * | ||
115 | */ | ||
38 | struct kvm_debug_exit_arch { | 116 | struct kvm_debug_exit_arch { |
117 | __u64 epc; | ||
39 | }; | 118 | }; |
40 | 119 | ||
41 | /* for KVM_SET_GUEST_DEBUG */ | 120 | /* for KVM_SET_GUEST_DEBUG */ |
42 | struct kvm_guest_debug_arch { | 121 | struct kvm_guest_debug_arch { |
43 | }; | 122 | }; |
44 | 123 | ||
124 | /* definition of registers in kvm_run */ | ||
125 | struct kvm_sync_regs { | ||
126 | }; | ||
127 | |||
128 | /* dummy definition */ | ||
129 | struct kvm_sregs { | ||
130 | }; | ||
131 | |||
45 | struct kvm_mips_interrupt { | 132 | struct kvm_mips_interrupt { |
46 | /* in */ | 133 | /* in */ |
47 | __u32 cpu; | 134 | __u32 cpu; |
48 | __u32 irq; | 135 | __u32 irq; |
49 | }; | 136 | }; |
50 | 137 | ||
51 | /* definition of registers in kvm_run */ | ||
52 | struct kvm_sync_regs { | ||
53 | }; | ||
54 | |||
55 | #endif /* __LINUX_KVM_MIPS_H */ | 138 | #endif /* __LINUX_KVM_MIPS_H */ |