From: Tianyu Lan <[email protected]> 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 <[email protected]> --- drivers/hv/hv.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c index 308c8f279df8..f77c1dc0e8d4 100644 --- a/drivers/hv/hv.c +++ b/drivers/hv/hv.c @@ -20,6 +20,11 @@ #include <linux/interrupt.h> #include <clocksource/hyperv_timer.h> #include <asm/mshyperv.h> + +#if IS_ENABLED(CONFIG_AMD_SECURE_AVIC) +#include <asm/apic.h> +#endif + #include <linux/set_memory.h> #include "hyperv_vmbus.h" @@ -311,6 +316,10 @@ void hv_synic_enable_regs(unsigned int cpu) enable_percpu_irq(vmbus_irq, 0); shared_sint.as_uint64 = hv_get_msr(HV_MSR_SINT0 + VMBUS_MESSAGE_SINT); +#if IS_ENABLED(CONFIG_AMD_SECURE_AVIC) + x2apic_savic_update_vector(smp_processor_id(), vmbus_interrupt, true); +#endif + shared_sint.vector = vmbus_interrupt; shared_sint.masked = false; shared_sint.auto_eoi = hv_recommend_using_aeoi(); -- 2.25.1
