Skip to content

Commit c11eb8a

Browse files
committed
x86/hyperv: Register the handler of redirected proxy interrupts
Implement the hv_{setup, remove}__redirected_proxy_intr_handler() function. Store a pointer to the handler that the Hyper-V VTL driver provides. It will be needed when dispatching hardware interrupt vectors that have been mapped to proxy interrupts. Signed-off-by: Ricardo Neri <[email protected]>
1 parent aa6d187 commit c11eb8a

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

arch/x86/kernel/cpu/mshyperv.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ static void (*vmbus_handler)(void);
114114
static void (*hv_stimer0_handler)(void);
115115
static void (*hv_kexec_handler)(void);
116116
static void (*hv_crash_handler)(struct pt_regs *regs);
117+
#ifdef CONFIG_HYPERV_VTL_MODE
118+
static void (*hv_redirected_proxy_intr_handler)(u32 vector);
119+
#endif
117120

118121
DEFINE_IDTENTRY_SYSVEC(sysvec_hyperv_callback)
119122
{
@@ -210,6 +213,23 @@ void hv_remove_crash_handler(void)
210213
hv_crash_handler = NULL;
211214
}
212215

216+
#ifdef CONFIG_HYPERV_VTL_MODE
217+
void hv_setup_redirected_proxy_intr_handler(void (*handler)(u32 vector))
218+
{
219+
hv_redirected_proxy_intr_handler = handler;
220+
}
221+
222+
void hv_remove_redirected_proxy_intr_handler(void)
223+
{
224+
/*
225+
* The interrupt gate is still allocated. Interrupts will
226+
* continue to be acked with out a handler they cannot be
227+
* proper processed.
228+
*/
229+
hv_redirected_proxy_intr_handler = NULL;
230+
}
231+
#endif
232+
213233
#ifdef CONFIG_KEXEC_CORE
214234
static void hv_machine_shutdown(void)
215235
{

0 commit comments

Comments
 (0)