[RFC Patch v2 2/4] drivers/hv: Allow vmbus message synic interrupt injected from Hyper-V

Tianyu Lan posted 4 patches 3 months, 4 weeks ago
There is a newer version of this series
[RFC Patch v2 2/4] drivers/hv: Allow vmbus message synic interrupt injected from Hyper-V
Posted by Tianyu Lan 3 months, 4 weeks ago
From: Tianyu Lan <tiala@microsoft.com>

When Secure AVIC is enabled, Vmbus driver should
call x2apic Secure AVIC interface to allow Hyper-V
to inject Vmbus message interrupt.

Signed-off-by: Tianyu Lan <tiala@microsoft.com>
---
 drivers/hv/hv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 308c8f279df8..f78b46c51d69 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -20,6 +20,7 @@
 #include <linux/interrupt.h>
 #include <clocksource/hyperv_timer.h>
 #include <asm/mshyperv.h>
+#include <asm/apic.h>
 #include <linux/set_memory.h>
 #include "hyperv_vmbus.h"
 
@@ -310,6 +311,7 @@ void hv_synic_enable_regs(unsigned int cpu)
 	if (vmbus_irq != -1)
 		enable_percpu_irq(vmbus_irq, 0);
 	shared_sint.as_uint64 = hv_get_msr(HV_MSR_SINT0 + VMBUS_MESSAGE_SINT);
+	apic_update_vector(smp_processor_id(), vmbus_interrupt, true);
 
 	shared_sint.vector = vmbus_interrupt;
 	shared_sint.masked = false;
-- 
2.25.1