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

Re: [PATCH 01/10] x86/ucode: Turn microcode_init_cache() into a presmp_initcall


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Sat, 2 Nov 2024 11:43:58 -0400
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730562241; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=c50rI2GD3TZzGa8WcxTRRBV2MLbkgNEAvy09dAxAyNs=; b=HYL+wiNLB/lhs59u13AGDBiOKKRFBAqt2Seo2x506nKD/RxJCJ3OuiYynOx9SKw1GnmN9etoxuqxMEV6X07FjciStYHr7cDeUTXbhKyjiAMsG1XmrDTCNLlOn6BSTqFIPhzMCOd1pF5DxjpWUPXVZsxqPan5Sl0ETwsKdJXVqSY=
  • Arc-seal: i=1; a=rsa-sha256; t=1730562241; cv=none; d=zohomail.com; s=zohoarc; b=OGBIPuAQMsVyjarfdBi5LqKuRWBG/n7EtlBJH6mljL1ikSK3LnT2MVvp2WvZhMSvaX5qun7VlSk0KjVFJC26FdNm4U3GbVwqGT4BFHm7oOEzg5psWIICOR0Gi9okijUdlXPHM3PxC/xj+MdGqWWvzw/LZGeZd4TPbkjmQnC3yWM=
  • Cc: Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Sat, 02 Nov 2024 15:44:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 10/28/24 05:18, Andrew Cooper wrote:
There's no need for microcode_init_cache() to be called exactly where it is in
__start_xen().  All that matters is it must be after xmalloc() is available
and before APs start up.

As a consequence, microcode_init_cache() runs a little later on boot now.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
---
  xen/arch/x86/cpu/microcode/core.c    | 4 +++-
  xen/arch/x86/include/asm/microcode.h | 1 -
  xen/arch/x86/setup.c                 | 2 --
  3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/cpu/microcode/core.c 
b/xen/arch/x86/cpu/microcode/core.c
index 8d916d891e6e..9a2cc631d2aa 100644
--- a/xen/arch/x86/cpu/microcode/core.c
+++ b/xen/arch/x86/cpu/microcode/core.c
@@ -819,8 +819,9 @@ static int __init early_update_cache(const void *data, 
size_t len)
      return rc;
  }
-int __init microcode_init_cache(struct boot_info *bi)
+static int __init cf_check microcode_init_cache(void)
  {
+    struct boot_info *bi = &xen_boot_info;

For context, the current function definition didn't have *bi const because it will become necessary later update state in bi. So it is natural for it to remain as such by getting the reference from global.

Reviewed-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>



 


Rackspace

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