kvm.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. __u64 gprs[32];
  25. __u64 hi;
  26. __u64 lo;
  27. __u64 pc;
  28. __u32 cp0reg[N_MIPS_COPROC_REGS][N_MIPS_COPROC_SEL];
  29. };
  30. /* for KVM_GET_SREGS and KVM_SET_SREGS */
  31. struct kvm_sregs {
  32. };
  33. /*
  34. * for KVM_GET_FPU and KVM_SET_FPU
  35. *
  36. * If Status[FR] is zero (32-bit FPU), the upper 32-bits of the FPRs
  37. * are zero filled.
  38. */
  39. struct kvm_fpu {
  40. __u64 fpr[32];
  41. __u32 fir;
  42. __u32 fccr;
  43. __u32 fexr;
  44. __u32 fenr;
  45. __u32 fcsr;
  46. __u32 pad;
  47. };
  48. struct kvm_debug_exit_arch {
  49. };
  50. /* for KVM_SET_GUEST_DEBUG */
  51. struct kvm_guest_debug_arch {
  52. };
  53. struct kvm_mips_interrupt {
  54. /* in */
  55. __u32 cpu;
  56. __u32 irq;
  57. };
  58. /* definition of registers in kvm_run */
  59. struct kvm_sync_regs {
  60. };
  61. #endif /* __LINUX_KVM_MIPS_H */