kvm_book3s_asm.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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 SUSE Linux Products GmbH 2009
  16. *
  17. * Authors: Alexander Graf <agraf@suse.de>
  18. */
  19. #ifndef __ASM_KVM_BOOK3S_ASM_H__
  20. #define __ASM_KVM_BOOK3S_ASM_H__
  21. #ifdef __ASSEMBLY__
  22. #ifdef CONFIG_KVM_BOOK3S_64_HANDLER
  23. #include <asm/kvm_asm.h>
  24. .macro DO_KVM intno
  25. .if (\intno == BOOK3S_INTERRUPT_SYSTEM_RESET) || \
  26. (\intno == BOOK3S_INTERRUPT_MACHINE_CHECK) || \
  27. (\intno == BOOK3S_INTERRUPT_DATA_STORAGE) || \
  28. (\intno == BOOK3S_INTERRUPT_INST_STORAGE) || \
  29. (\intno == BOOK3S_INTERRUPT_DATA_SEGMENT) || \
  30. (\intno == BOOK3S_INTERRUPT_INST_SEGMENT) || \
  31. (\intno == BOOK3S_INTERRUPT_EXTERNAL) || \
  32. (\intno == BOOK3S_INTERRUPT_ALIGNMENT) || \
  33. (\intno == BOOK3S_INTERRUPT_PROGRAM) || \
  34. (\intno == BOOK3S_INTERRUPT_FP_UNAVAIL) || \
  35. (\intno == BOOK3S_INTERRUPT_DECREMENTER) || \
  36. (\intno == BOOK3S_INTERRUPT_SYSCALL) || \
  37. (\intno == BOOK3S_INTERRUPT_TRACE) || \
  38. (\intno == BOOK3S_INTERRUPT_PERFMON) || \
  39. (\intno == BOOK3S_INTERRUPT_ALTIVEC) || \
  40. (\intno == BOOK3S_INTERRUPT_VSX)
  41. b kvmppc_trampoline_\intno
  42. kvmppc_resume_\intno:
  43. .endif
  44. .endm
  45. #else
  46. .macro DO_KVM intno
  47. .endm
  48. #endif /* CONFIG_KVM_BOOK3S_64_HANDLER */
  49. #else /*__ASSEMBLY__ */
  50. struct kvmppc_book3s_shadow_vcpu {
  51. ulong gpr[14];
  52. u32 cr;
  53. u32 xer;
  54. ulong host_r1;
  55. ulong host_r2;
  56. ulong handler;
  57. ulong scratch0;
  58. ulong scratch1;
  59. ulong vmhandler;
  60. };
  61. #endif /*__ASSEMBLY__ */
  62. #endif /* __ASM_KVM_BOOK3S_ASM_H__ */