From nobody Fri Dec 19 16:03:24 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6B03C001DB for ; Mon, 7 Aug 2023 13:53:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234632AbjHGNxw (ORCPT ); Mon, 7 Aug 2023 09:53:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234628AbjHGNxI (ORCPT ); Mon, 7 Aug 2023 09:53:08 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EC2C1998 for ; Mon, 7 Aug 2023 06:52:59 -0700 (PDT) Message-ID: <20230807135027.220542701@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1691416377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=i7sHYpcfJ8EKrCzslt2cAc24NWY6qek5394P5PZEbDQ=; b=xAQ++Jeb+Bws6TZKoZprgVFN41qjVqyRoZrxNcbKYSE7HCHUH3izQG3H37/Ne7AE4sZnJf 4Ji1ddnHpxaq3LxwaSyZ6oVbxDwjLkLbot99d6K/QnxIFeJ3yjKCFcBpZrRd6TJEKkWIyH LnHp9b5RDo4O/tfbeYI0rqpkZ7noKLrNV66xMHwBZdSmy5Dmz0xEnWtRQekpptE+kuF8p1 i5C5+5ZQilAsSEEJl0ZJnM9pIQ/n4XRbS5xMGfU1/WpMM0FIrqd8Ra7Ij1quzBu36X2R4l ygoUyh41HVQrnBAV5VjZXAezj2GfcY8veyzg+yXUPEg06wdzxqwhzbuy6EP9PA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1691416377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=i7sHYpcfJ8EKrCzslt2cAc24NWY6qek5394P5PZEbDQ=; b=J+42HbohHoZY8IBobNxA3UyjtM/YGMN0JHljRLaHwjgARHDCbePa1M9g8a9X9Awe4JKQjt 21fpEsZfZMJH9rBg== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Tom Lendacky , Andrew Cooper , Arjan van de Ven , Huang Rui , Juergen Gross , Dimitri Sivanich , Michael Kelley , Sohil Mehta , K Prateek Nayak , Kan Liang , Zhang Rui , "Paul E. McKenney" , Feng Tang , Andy Shevchenko Subject: [patch 15/53] x86/jailhouse: Prepare for separate mpparse callbacks References: <20230807130108.853357011@linutronix.de> MIME-Version: 1.0 Date: Mon, 7 Aug 2023 15:52:56 +0200 (CEST) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Provide a wrapper around the existing function and fill the new callbacks in. No functional change as the new callbacks are not yet operational. Signed-off-by: Thomas Gleixner --- arch/x86/kernel/jailhouse.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) --- a/arch/x86/kernel/jailhouse.c +++ b/arch/x86/kernel/jailhouse.c @@ -118,6 +118,11 @@ static void __init jailhouse_get_smp_con } } =20 +static void __init jailhouse_parse_smp_config(void) +{ + jailhouse_get_smp_config(false); +} + static void jailhouse_no_restart(void) { pr_notice("Jailhouse: Restart not supported, halting\n"); @@ -201,21 +206,24 @@ static void __init jailhouse_init_platfo struct setup_data header; void *mapping; =20 - x86_init.irqs.pre_vector_init =3D x86_init_noop; - x86_init.timers.timer_init =3D jailhouse_timer_init; - x86_init.mpparse.get_smp_config =3D jailhouse_get_smp_config; - x86_init.pci.arch_init =3D jailhouse_pci_arch_init; - - x86_platform.calibrate_cpu =3D jailhouse_get_tsc; - x86_platform.calibrate_tsc =3D jailhouse_get_tsc; - x86_platform.get_wallclock =3D jailhouse_get_wallclock; - x86_platform.legacy.rtc =3D 0; - x86_platform.legacy.warm_reset =3D 0; - x86_platform.legacy.i8042 =3D X86_LEGACY_I8042_PLATFORM_ABSENT; + x86_init.irqs.pre_vector_init =3D x86_init_noop; + x86_init.timers.timer_init =3D jailhouse_timer_init; + x86_init.mpparse.find_mptable =3D x86_init_noop; + x86_init.mpparse.early_parse_smp_cfg =3D x86_init_noop; + x86_init.mpparse.parse_smp_cfg =3D jailhouse_parse_smp_config; + x86_init.mpparse.get_smp_config =3D jailhouse_get_smp_config; + x86_init.pci.arch_init =3D jailhouse_pci_arch_init; + + x86_platform.calibrate_cpu =3D jailhouse_get_tsc; + x86_platform.calibrate_tsc =3D jailhouse_get_tsc; + x86_platform.get_wallclock =3D jailhouse_get_wallclock; + x86_platform.legacy.rtc =3D 0; + x86_platform.legacy.warm_reset =3D 0; + x86_platform.legacy.i8042 =3D X86_LEGACY_I8042_PLATFORM_ABSENT; =20 - legacy_pic =3D &null_legacy_pic; + legacy_pic =3D &null_legacy_pic; =20 - machine_ops.emergency_restart =3D jailhouse_no_restart; + machine_ops.emergency_restart =3D jailhouse_no_restart; =20 while (pa_data) { mapping =3D early_memremap(pa_data, sizeof(header));