[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<SN6PR02MB4157E36F3C23833A4C9F393AD45EA@SN6PR02MB4157.namprd02.prod.outlook.com>
Date: Thu, 24 Jul 2025 23:35:04 +0000
From: Michael Kelley <mhklinux@...look.com>
To: Tianyu Lan <ltykernel@...il.com>, "kys@...rosoft.com" <kys@...rosoft.com>,
"haiyangz@...rosoft.com" <haiyangz@...rosoft.com>, "wei.liu@...nel.org"
<wei.liu@...nel.org>, "decui@...rosoft.com" <decui@...rosoft.com>,
"tglx@...utronix.de" <tglx@...utronix.de>, "mingo@...hat.com"
<mingo@...hat.com>, "bp@...en8.de" <bp@...en8.de>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>, "x86@...nel.org"
<x86@...nel.org>, "hpa@...or.com" <hpa@...or.com>, "arnd@...db.de"
<arnd@...db.de>, "Neeraj.Upadhyay@....com" <Neeraj.Upadhyay@....com>
CC: Tianyu Lan <tiala@...rosoft.com>, "linux-arch@...r.kernel.org"
<linux-arch@...r.kernel.org>, "linux-hyperv@...r.kernel.org"
<linux-hyperv@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [RFC PATCH V3 4/4] x86/hyperv: Allow Hyper-V to inject STIMER0
interrupts
From: Tianyu Lan <ltykernel@...il.com> Sent: Wednesday, July 23, 2025 12:03 PM
>
> When Secure AVIC is enabled, call Secure AVIC
> function to allow Hyper-V to inject STIMER0 interrupt.
>
> Signed-off-by: Tianyu Lan <tiala@...rosoft.com>
> ---
> arch/x86/hyperv/hv_init.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c
> index 3d1d3547095a..591338162420 100644
> --- a/arch/x86/hyperv/hv_init.c
> +++ b/arch/x86/hyperv/hv_init.c
> @@ -132,6 +132,10 @@ static int hv_cpu_init(unsigned int cpu)
> wrmsrq(HV_X64_MSR_VP_ASSIST_PAGE, msr.as_uint64);
> }
>
> + /* Allow Hyper-V stimer vector to be injected from Hypervisor. */
> + if (ms_hyperv.misc_features & HV_STIMER_DIRECT_MODE_AVAILABLE)
> + apic_update_vector(cpu, HYPERV_STIMER0_VECTOR, true);
> +
> return hyperv_init_ghcb();
> }
>
> @@ -239,6 +243,9 @@ static int hv_cpu_die(unsigned int cpu)
> *ghcb_va = NULL;
> }
>
> + if (ms_hyperv.misc_features & HV_STIMER_DIRECT_MODE_AVAILABLE)
> + apic_update_vector(cpu, HYPERV_STIMER0_VECTOR, false);
> +
> hv_common_cpu_die(cpu);
>
> if (hv_vp_assist_page && hv_vp_assist_page[cpu]) {
> --
> 2.25.1
>
Reviewed-by: Michael Kelley <mhklinux@...look.com>
Powered by blists - more mailing lists