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

Re: [PATCH] x86/amd: Only call setup_force_cpu_cap for boot CPU


  • To: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 11 Aug 2022 14:19:09 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=vt4YhZ+VsFMAnXlFl+BbRUtWC73QOZDgvmRBY//Bzks=; b=WId0e9fW/zEj+Ieot39LyfBO1Xe3pjGCTDE9nJVdE0BcLdGnMk9RgtEaJfoBS2pa4UCjZ/UcHwlbjhijJYqHH6oCBfnrlmBiUAm03cTTOr43+HOSqytgB6lrE98tCxQ5/4RhkUnodjLJM3NPGwvtSXv3NILho13T+5VZLrBlTxBws+fq7F95nJZH9R1Ep+lgrkq2xA1UScylmuli/NQqZnr1em6NIWKJ0BwWdlSFoL+VrVGvt7gVOw/DwVT0zr6uJErJBIJtOXz927Y8AHIyarrplpmcdx3+YTKjzZDbeCIpeXgoqUAPcZZxCSD2n3t5/40VuNQ8YuF0UvT6FtHYuQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Oijw+qy+lo+ibc2AzNyWyAzabVp78IZCIu8vgCFeO4PgLpE78XVkXKQnB8NDh9iQd2SYVermtht8SkQU97J6P68qsiKx0C/ojN32Deu9CCWPV9SXEP2Q0QllZ2mL60slO+sNituVwgwKSgI5oiEgScJ1gDT8MBoE/NWn0+ZYjqzklSV37rBAY8KfplV1nvwvpop+S+CBRmOYQXkq1Zmpt4mVQbLeqz96nm1fHr8joAh53ExBmgj9lnYO9TWkO41v7vXmcvFn8L+SjM8slo4MPD7PQ33uXF/QpG/X66NppPgPRA2ezetpYgbweEZIzODTmqTklJJuP8Zv0g1V4MQhcA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 11 Aug 2022 12:19:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11.08.2022 12:59, Ross Lagerwall wrote:
> This should only be called for the boot CPU to avoid calling _init code
> after it has been unloaded.
> 
> Fixes: 062868a5a8b4 ("x86/amd: Work around CLFLUSH ordering on older parts")
> Signed-off-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
albeit ...

> --- a/xen/arch/x86/cpu/amd.c
> +++ b/xen/arch/x86/cpu/amd.c
> @@ -845,7 +845,7 @@ static void cf_check init_amd(struct cpuinfo_x86 *c)
>        * everything, including reads and writes to address, and
>        * LFENCE/SFENCE instructions.
>        */
> -     if (!cpu_has_clflushopt)
> +     if (c == &boot_cpu_data && !cpu_has_clflushopt)

... I would have put the two sides of the && the other way around.

Jan



 


Rackspace

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