[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86a8fe2f-566a-d0b9-7a22-9b41c91796f8@intel.com>
Date: Mon, 13 Feb 2023 09:59:17 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: Kai Huang <kai.huang@...el.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org
Cc: linux-mm@...ck.org, peterz@...radead.org, tglx@...utronix.de,
seanjc@...gle.com, pbonzini@...hat.com, dan.j.williams@...el.com,
rafael.j.wysocki@...el.com, kirill.shutemov@...ux.intel.com,
ying.huang@...el.com, reinette.chatre@...el.com,
len.brown@...el.com, tony.luck@...el.com, ak@...ux.intel.com,
isaku.yamahata@...el.com, chao.gao@...el.com,
sathyanarayanan.kuppuswamy@...ux.intel.com, david@...hat.com,
bagasdotme@...il.com, sagis@...gle.com, imammedo@...hat.com
Subject: Re: [PATCH v9 07/18] x86/virt/tdx: Do TDX module per-cpu
initialization
On 2/13/23 03:59, Kai Huang wrote:
> To avoid duplicated code, add a
> helper to call SEAMCALL on all online cpus one by one but with a skip
> function to check whether to skip certain cpus, and use that helper to
> do the per-cpu initialization.
...
> +/*
> + * Call @func on all online cpus one by one but skip those cpus
> + * when @skip_func is valid and returns true for them.
> + */
> +static int tdx_on_each_cpu_cond(int (*func)(void *), void *func_data,
> + bool (*skip_func)(int cpu, void *),
> + void *skip_data)
I only see one caller of this. Where is the duplicated code?
Powered by blists - more mailing lists