Skip to content

Commit 75156c5

Browse files
kelleymhSasha Levin
authored andcommitted
Drivers: hv: vmbus: Add hooks for per-CPU IRQ
Add hooks to enable/disable a per-CPU IRQ for VMbus. These hooks are in the architecture independent setup and shutdown paths for Hyper-V, and are needed by Linux guests on Hyper-V on ARM64. The x86/x64 implementation is null because VMbus interrupts on x86/x64 don't use an IRQ. Signed-off-by: Michael Kelley <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 5c904a1 commit 75156c5

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

arch/x86/include/asm/mshyperv.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ typedef int (*hyperv_fill_flush_list_func)(
5656
#define hv_get_raw_timer() rdtsc_ordered()
5757
#define hv_get_vector() HYPERVISOR_CALLBACK_VECTOR
5858

59+
/* On x86/x64, there isn't a real IRQ to be enabled/disable */
60+
static inline void hv_enable_vmbus_irq(void) {}
61+
static inline void hv_disable_vmbus_irq(void) {}
62+
5963
/*
6064
* Reference to pv_ops must be inline so objtool
6165
* detection of noinstr violations can work correctly.

drivers/hv/hv.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ void hv_synic_enable_regs(unsigned int cpu)
178178
hv_set_siefp(siefp.as_uint64);
179179

180180
/* Setup the shared SINT. */
181+
hv_enable_vmbus_irq();
181182
hv_get_synint_state(VMBUS_MESSAGE_SINT, shared_sint.as_uint64);
182183

183184
shared_sint.vector = hv_get_vector();
@@ -235,6 +236,8 @@ void hv_synic_disable_regs(unsigned int cpu)
235236
hv_get_synic_state(sctrl.as_uint64);
236237
sctrl.enable = 0;
237238
hv_set_synic_state(sctrl.as_uint64);
239+
240+
hv_disable_vmbus_irq();
238241
}
239242

240243
int hv_synic_cleanup(unsigned int cpu)

0 commit comments

Comments
 (0)