hmi.h 971 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Hypervisor Maintenance Interrupt header file.
  4. *
  5. * Copyright 2015 IBM Corporation
  6. * Author: Mahesh Salgaonkar <[email protected]>
  7. */
  8. #ifndef __ASM_PPC64_HMI_H__
  9. #define __ASM_PPC64_HMI_H__
  10. #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
  11. #define CORE_TB_RESYNC_REQ_BIT 63
  12. #define MAX_SUBCORE_PER_CORE 4
  13. /*
  14. * sibling_subcore_state structure is used to co-ordinate all threads
  15. * during HMI to avoid TB corruption. This structure is allocated once
  16. * per each core and shared by all threads on that core.
  17. */
  18. struct sibling_subcore_state {
  19. unsigned long flags;
  20. u8 in_guest[MAX_SUBCORE_PER_CORE];
  21. };
  22. extern void wait_for_subcore_guest_exit(void);
  23. extern void wait_for_tb_resync(void);
  24. #else
  25. static inline void wait_for_subcore_guest_exit(void) { }
  26. static inline void wait_for_tb_resync(void) { }
  27. #endif
  28. struct pt_regs;
  29. extern long hmi_handle_debugtrig(struct pt_regs *regs);
  30. #endif /* __ASM_PPC64_HMI_H__ */