Skip to content

Commit f6d968b

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]> --- Changes since v1: * None
1 parent 9857c55 commit f6d968b

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
@@ -115,6 +115,9 @@ static void (*vmbus_handler)(void);
115115
static void (*hv_stimer0_handler)(void);
116116
static void (*hv_kexec_handler)(void);
117117
static void (*hv_crash_handler)(struct pt_regs *regs);
118+
#ifdef CONFIG_HYPERV_VTL_MODE
119+
static void (*hv_redirected_proxy_intr_handler)(u32 vector);
120+
#endif
118121

119122
DEFINE_IDTENTRY_SYSVEC(sysvec_hyperv_callback)
120123
{
@@ -214,6 +217,23 @@ void hv_remove_crash_handler(void)
214217
hv_crash_handler = NULL;
215218
}
216219

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

0 commit comments

Comments
 (0)