Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/hyperv: Allow Hyper-V to inject STIMER0 interrupts

When Secure AVIC is enabled, call Secure AVIC
function to allow Hyper-V to inject STIMER0 interrupt.

Reviewed-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Signed-off-by: Tianyu Lan <tiala@microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>

authored by

Tianyu Lan and committed by
Wei Liu
5e52db91 c52c957e

+7
+7
arch/x86/hyperv/hv_init.c
··· 170 170 wrmsrq(HV_X64_MSR_VP_ASSIST_PAGE, msr.as_uint64); 171 171 } 172 172 173 + /* Allow Hyper-V stimer vector to be injected from Hypervisor. */ 174 + if (ms_hyperv.misc_features & HV_STIMER_DIRECT_MODE_AVAILABLE) 175 + apic_update_vector(cpu, HYPERV_STIMER0_VECTOR, true); 176 + 173 177 return hyperv_init_ghcb(); 174 178 } 175 179 ··· 280 276 iounmap(*ghcb_va); 281 277 *ghcb_va = NULL; 282 278 } 279 + 280 + if (ms_hyperv.misc_features & HV_STIMER_DIRECT_MODE_AVAILABLE) 281 + apic_update_vector(cpu, HYPERV_STIMER0_VECTOR, false); 283 282 284 283 hv_common_cpu_die(cpu); 285 284