[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a63c260e-0d30-4f88-becd-69b40157ff57@amd.com>
Date: Thu, 3 Apr 2025 17:28:02 +0530
From: Neeraj Upadhyay <Neeraj.Upadhyay@....com>
To: Thomas Gleixner <tglx@...utronix.de>, 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 v3 06/17] x86/apic: Add support to send IPI for Secure
AVIC
On 4/3/2025 5:15 PM, Thomas Gleixner wrote:
> On Tue, Apr 01 2025 at 17:06, Neeraj Upadhyay wrote:
>> --- a/arch/x86/kernel/apic/x2apic_savic.c
>> +++ b/arch/x86/kernel/apic/x2apic_savic.c
>> @@ -46,6 +46,25 @@ static __always_inline void set_reg(unsigned int offset, u32 val)
>>
>> #define SAVIC_ALLOWED_IRR 0x204
>>
>> +static inline void update_vector(unsigned int cpu, unsigned int offset,
>> + unsigned int vector, bool set)
>
> Why aren't you placing that function right away there instead of adding
> it first somewhere else and then shuffle it around?
>
Ok. Intent was to move this logic to a function only when second usage came during
the series. I will move it to "05/17 x86/apic: Add update_vector callback for Secure AVIC"
>> -static void __send_ipi_mask(const struct cpumask *mask, int vector, bool excl_self)
>> +static void send_ipi_mask(const struct cpumask *mask, unsigned int vector, bool excl_self)
>> {
>> - unsigned long query_cpu;
>> - unsigned long this_cpu;
>> + unsigned int this_cpu;
>> + unsigned int cpu;
>
> Again. Do it right in the first place and not later. Same for the
> underscores of the function name.
>
Ok. Another approach I was thinking to try next was, to remove IPI callbacks
definition from "01/17 x86/apic: Add new driver for Secure AVIC" (where I mostly copy
logic from x2apic_phys.c) and add define then in this patch. Then the diff
will be clearer.
- Neeraj
Powered by blists - more mailing lists