kvm.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * This program is free software; you can redistribute it and/or modify
  3. * it under the terms of the GNU General Public License, version 2, as
  4. * published by the Free Software Foundation.
  5. *
  6. * This program is distributed in the hope that it will be useful,
  7. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. * GNU General Public License for more details.
  10. *
  11. * You should have received a copy of the GNU General Public License
  12. * along with this program; if not, write to the Free Software
  13. * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  14. *
  15. * Copyright IBM Corp. 2007
  16. *
  17. * Authors: Hollis Blanchard <hollisb@us.ibm.com>
  18. */
  19. #ifndef __LINUX_KVM_POWERPC_H
  20. #define __LINUX_KVM_POWERPC_H
  21. #include <linux/types.h>
  22. struct kvm_regs {
  23. __u64 pc;
  24. __u64 cr;
  25. __u64 ctr;
  26. __u64 lr;
  27. __u64 xer;
  28. __u64 msr;
  29. __u64 srr0;
  30. __u64 srr1;
  31. __u64 pid;
  32. __u64 sprg0;
  33. __u64 sprg1;
  34. __u64 sprg2;
  35. __u64 sprg3;
  36. __u64 sprg4;
  37. __u64 sprg5;
  38. __u64 sprg6;
  39. __u64 sprg7;
  40. __u64 gpr[32];
  41. };
  42. struct kvm_sregs {
  43. __u32 pvr;
  44. union {
  45. struct {
  46. __u64 sdr1;
  47. struct {
  48. struct {
  49. __u64 slbe;
  50. __u64 slbv;
  51. } slb[64];
  52. } ppc64;
  53. struct {
  54. __u32 sr[16];
  55. __u64 ibat[8];
  56. __u64 dbat[8];
  57. } ppc32;
  58. } s;
  59. __u8 pad[1020];
  60. } u;
  61. };
  62. struct kvm_fpu {
  63. __u64 fpr[32];
  64. };
  65. struct kvm_debug_exit_arch {
  66. };
  67. /* for KVM_SET_GUEST_DEBUG */
  68. struct kvm_guest_debug_arch {
  69. };
  70. #define KVM_REG_MASK 0x001f
  71. #define KVM_REG_EXT_MASK 0xffe0
  72. #define KVM_REG_GPR 0x0000
  73. #define KVM_REG_FPR 0x0020
  74. #define KVM_REG_QPR 0x0040
  75. #define KVM_REG_FQPR 0x0060
  76. #define KVM_INTERRUPT_SET -1U
  77. #define KVM_INTERRUPT_UNSET -2U
  78. #endif /* __LINUX_KVM_POWERPC_H */