kvm.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  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. */
  10. #ifndef __LINUX_KVM_MIPS_H
  11. #define __LINUX_KVM_MIPS_H
  12. #include <linux/types.h>
  13. #define __KVM_MIPS
  14. #define N_MIPS_COPROC_REGS 32
  15. #define N_MIPS_COPROC_SEL 8
  16. /*
  17. * for KVM_GET_REGS and KVM_SET_REGS
  18. *
  19. * If Config[AT] is zero (32-bit CPU), the register contents are
  20. * stored in the lower 32-bits of the struct kvm_regs fields and sign
  21. * extended to 64-bits.
  22. */
  23. struct kvm_regs {
  24. /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */
  25. __u64 gpr[32];
  26. __u64 hi;
  27. __u64 lo;
  28. __u64 pc;
  29. __u32 cp0reg[N_MIPS_COPROC_REGS][N_MIPS_COPROC_SEL];
  30. };
  31. /* for KVM_GET_SREGS and KVM_SET_SREGS */
  32. struct kvm_sregs {
  33. };
  34. /*
  35. * for KVM_GET_FPU and KVM_SET_FPU
  36. *
  37. * If Status[FR] is zero (32-bit FPU), the upper 32-bits of the FPRs
  38. * are zero filled.
  39. */
  40. struct kvm_fpu {
  41. __u64 fpr[32];
  42. __u32 fir;
  43. __u32 fccr;
  44. __u32 fexr;
  45. __u32 fenr;
  46. __u32 fcsr;
  47. __u32 pad;
  48. };
  49. struct kvm_debug_exit_arch {
  50. };
  51. /* for KVM_SET_GUEST_DEBUG */
  52. struct kvm_guest_debug_arch {
  53. };
  54. struct kvm_mips_interrupt {
  55. /* in */
  56. __u32 cpu;
  57. __u32 irq;
  58. };
  59. /* definition of registers in kvm_run */
  60. struct kvm_sync_regs {
  61. };
  62. #endif /* __LINUX_KVM_MIPS_H */