[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 06/16] x86/cpu: Rework the vendor early_init() hooks to be __init


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 27 Jan 2026 14:09:05 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KZ6YXstgqKr0MaI+J2nsW0kDl/JbWFaXcHrORCE6uFM=; b=iFDq/EJQS48j2tohzEoCzbYcx4KjxyOlYZetK5biSKwJ6NnhLe5371k/v/HPfyVn1xgecfGAjMEaUA9qhHhddwoeFrYOk5MiolVYrXiws2e+YGozhC2Z2nrgbjjRmZQfF7VKMwH2jEjPbMoyanlTpjkQUcx5ddlilqvvHPjIhtFoZ2lBpGznf86VqqNt6r7ffagbcXizLGcbQpFGmFD/KItHmlj2C1RTpPLBU30E+e6RJxVjAS+rPBboJuOQpT0bFsRirIOsDpozgEhOyK7GFG5b77BI0phRqDeKats70oJmyqA8Nwzn/kbiruZN2UD8QkFrnYhHEYUYLs71w/zfJA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jKT2lYtKOUqOQ825r5OJrWQMXu5B73vQbnpLZSjCFMEPb0X/vafNurJd8S6kZJ4QWUfzrNmpPEP32g9bBeOtuKJ1OoIxfd56cj8elWL2lVZUA0eUXhY7ORXtdMBGTdGegb0esF4yLBT+zckkeoOKBUR+o+cBzjZzq0k20aGBsEhD1BBt0lIDPLeLkiwRoZGWbNAs/QE4J1GHjiT9PVwDkcwBLDGpVvuUJTVKRAsBwjCf3rmT0Yt5RqS1d2qqruy/MI6Sv+8AfUJuD7AAugpAQirPInqiwSmbWTPw6HuBlskPnaAoAD8K72jbhD/vnjZuVT7h79536CulXdElyswGyw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Julian Vetter <julian.vetter@xxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 27 Jan 2026 14:09:17 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 27/01/2026 2:05 pm, Jan Beulich wrote:
> On 26.01.2026 18:53, Andrew Cooper wrote:
>> --- a/xen/arch/x86/cpu/common.c
>> +++ b/xen/arch/x86/cpu/common.c
>> @@ -503,8 +503,8 @@ void identify_cpu(struct cpuinfo_x86 *c)
>>      if (c->extended_cpuid_level >= 0x80000021)
>>              c->x86_capability[FEATURESET_e21a] = cpuid_eax(0x80000021);
>>  
>> -    if (actual_cpu.c_early_init)
>> -            alternative_vcall(actual_cpu.c_early_init, c);
>> +    if (c == &boot_cpu_data && actual_cpu.c_early_init)
>> +            alternative_vcall(actual_cpu.c_early_init);
> Using alternative_vcall() then doesn't make any sense anymore, does it?

It is still needed here, because this is .text and is a Spectre v1 into
v2 gadget otherwise.

I've dropped alternative_vcall() in patch 7 where it becomes safe to do so.

~Andrew

> With it replaced by an ordinary call:
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
>
> Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.