[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <871ptqspci.ffs@tglx>
Date: Thu, 17 Apr 2025 18:51:57 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Neeraj Upadhyay <Neeraj.Upadhyay@....com>, linux-kernel@...r.kernel.org
Cc: bp@...en8.de, mingo@...hat.com, dave.hansen@...ux.intel.com,
Thomas.Lendacky@....com, nikunj@....com, Santosh.Shukla@....com,
Vasant.Hegde@....com, Suravee.Suthikulpanit@....com, David.Kaplan@....com,
x86@...nel.org, hpa@...or.com, peterz@...radead.org, seanjc@...gle.com,
pbonzini@...hat.com, kvm@...r.kernel.org, kirill.shutemov@...ux.intel.com,
huibo.wang@....com, naveen.rao@....com, francescolavra.fl@...il.com
Subject: Re: [PATCH v4 06/18] x86/apic: Add update_vector callback for
Secure AVIC
On Thu, Apr 17 2025 at 17:30, Neeraj Upadhyay wrote:
> On 4/17/2025 4:20 PM, Thomas Gleixner wrote:
>>> +static __always_inline void apic_update_vector(unsigned int cpu, unsigned int vector, bool set)
>>> +{
>>> + if (apic->update_vector)
>>> + apic->update_vector(cpu, vector, set);
>>> +}
>>
>> This is in the public header because it can?
>>
>
> apic_update_vector() is needed for some system vectors which are emulated/injected
> by Hypervisor. Patch 8 calls it for lapic timer. HYPERVISOR_CALLBACK_VECTOR would need
> it for hyperv. This patch series does not call apic_update_vector() for
> HYPERVISOR_CALLBACK_VECTOR though.
Then explain so in the change log instead of letting reviewers
wonder. I'm patently bad at reading your thoughts.
>> Now if you look deeper, then you notice that all places which invoke
>> apic_update_vector() invoke apic_update_irq_cfg(), which is also called
>> at this other place, no?
>>
>
> Yes, makes sense. apic_update_irq_cfg() is called for MANAGED_IRQ_SHUTDOWN_VECTOR
> also. I am not aware of the use case of that vector. Whethere it is an interrupt
> which is injected by Hypervisor.
It can. The managed shutdown vector is used when a queue of a managed
multiqueue device is shut down. The device MSI-X entry is redirected to
this special vector in case that the device/hardware raises an
unexpected spurious interrupt post shut down.
Thanks,
tglx
Powered by blists - more mailing lists