Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * Hypervisor Maintenance Interrupt header file.
0004  *
0005  * Copyright 2015 IBM Corporation
0006  * Author: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
0007  */
0008 
0009 #ifndef __ASM_PPC64_HMI_H__
0010 #define __ASM_PPC64_HMI_H__
0011 
0012 #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
0013 
0014 #define CORE_TB_RESYNC_REQ_BIT      63
0015 #define MAX_SUBCORE_PER_CORE        4
0016 
0017 /*
0018  * sibling_subcore_state structure is used to co-ordinate all threads
0019  * during HMI to avoid TB corruption. This structure is allocated once
0020  * per each core and shared by all threads on that core.
0021  */
0022 struct sibling_subcore_state {
0023     unsigned long   flags;
0024     u8      in_guest[MAX_SUBCORE_PER_CORE];
0025 };
0026 
0027 extern void wait_for_subcore_guest_exit(void);
0028 extern void wait_for_tb_resync(void);
0029 #else
0030 static inline void wait_for_subcore_guest_exit(void) { }
0031 static inline void wait_for_tb_resync(void) { }
0032 #endif
0033 
0034 struct pt_regs;
0035 extern long hmi_handle_debugtrig(struct pt_regs *regs);
0036 
0037 #endif /* __ASM_PPC64_HMI_H__ */