blob: d145ead16b2c8689563c5e6a2876146a49a78078 [file] [log] [blame]
Sanjay Lal740765c2012-11-21 18:34:00 -08001/*
David Daney1f3dc6d2013-05-23 09:49:05 -07002 * 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 Lal740765c2012-11-21 18:34:00 -080010
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 Daney688cded2013-05-23 09:49:06 -070021/*
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 Lal740765c2012-11-21 18:34:00 -080028struct kvm_regs {
David Daneybf32ebf2013-05-23 09:49:07 -070029 /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */
30 __u64 gpr[32];
David Daney688cded2013-05-23 09:49:06 -070031 __u64 hi;
32 __u64 lo;
33 __u64 pc;
Sanjay Lal740765c2012-11-21 18:34:00 -080034
35 __u32 cp0reg[N_MIPS_COPROC_REGS][N_MIPS_COPROC_SEL];
36};
37
38/* for KVM_GET_SREGS and KVM_SET_SREGS */
39struct kvm_sregs {
40};
41
David Daney1f3dc6d2013-05-23 09:49:05 -070042/*
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 Lal740765c2012-11-21 18:34:00 -080048struct kvm_fpu {
David Daney1f3dc6d2013-05-23 09:49:05 -070049 __u64 fpr[32];
50 __u32 fir;
51 __u32 fccr;
52 __u32 fexr;
53 __u32 fenr;
54 __u32 fcsr;
55 __u32 pad;
Sanjay Lal740765c2012-11-21 18:34:00 -080056};
57
58struct kvm_debug_exit_arch {
59};
60
61/* for KVM_SET_GUEST_DEBUG */
62struct kvm_guest_debug_arch {
63};
64
65struct kvm_mips_interrupt {
66 /* in */
67 __u32 cpu;
68 __u32 irq;
69};
70
71/* definition of registers in kvm_run */
72struct kvm_sync_regs {
73};
74
75#endif /* __LINUX_KVM_MIPS_H */