Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp176536rdh; Tue, 13 Feb 2024 13:12:19 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW52lhRKwVrKJv1lh8fU6zBtLDxyqtwllL8o+19kDynW55a5m868u/0ZU+XKQ1QAF+NOOaGP8bE30wycIWfAiHsR5P2UsdP+3GB9nGr/g== X-Google-Smtp-Source: AGHT+IEsZp7AqEci0OcepQQob0z5ANZT2WrNmxQGHn9TH4BxTSEZkC+5Ysjxa9Klsa2ifK46DFk+ X-Received: by 2002:a05:622a:138b:b0:42c:7f02:ab43 with SMTP id o11-20020a05622a138b00b0042c7f02ab43mr709444qtk.26.1707858738946; Tue, 13 Feb 2024 13:12:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707858738; cv=pass; d=google.com; s=arc-20160816; b=worxJOO2y6Srpdy79ae2i81QHvWaCXPrF36AoMsnWFAq/N8hUlJgS6rqAVL3VBMOCS VSz8i+PgKp20esyht03f3k2eowzJFrwf9xcBAyxPd8Ek+xVduEB67tHOpQUJ7GXnxQt/ 2t2SWbQa+TiCuecfVGpMotWgwQVCGJDYI2unf7F7nHOusxFho4EtavAgYBujSkbUqLx9 xJihGUMSKSF4Nhr3rOcHA8GY62FCXNgueeDfx59nSWRTj72P+CdbFBOgbC6FL/3VjA8j 9o051K2TK61Sqx8WoOAqSmkM5sPSRpODXq53gaqg+qomafBDMEkyZG0ZjnQd7Lge3iBz 0E3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:subject:cc:to:from:dkim-signature :dkim-signature:message-id; bh=21XnL3/KpVSRQX9fQR+Ss73/rrljxkqQNbU70H6SdFY=; fh=zPTdtn/KZz/GCfr5aKIczvQcOXrfEKYtnXJUH+TxSn0=; b=gEA/GJ7zob55a/qiM4FVm6oW2ymwt6QEHS4GkJaLoSrjiC7ar1Yap2ScAcVctgcSJj 3ntTAVTgKm0V1w1smJr5QbNPCwXl6anZHrMBEXU4G3qVcnd8c5D0eDRwE/eh7ZdiOj/2 JVwE6ZVRX2DpDBMgUCDaNUDT7KdHfBDpvrRkZwJF9+h/7kM/YlmiXVaACjAGrmZYeQ3k BI/mAi0mSXEFeVlUie7vVvmQKK8qfMQsfk70dAUhiddS+3Jmb9jktoU9Y3wJ2AQu0BnR p1trtUoMTG/stbwX7KBv3n3RxLq8u3SkfHyJntvO7Oc3LgGCHHmsJAMarnIt0BrU8ZDZ 600g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=uZsom5YM; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-64275-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64275-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de X-Forwarded-Encrypted: i=2; AJvYcCXshhdKu5s9Orvvd6AiIr6qc++xfytRnlL+fioSdzV7WJi3wmRmNaP0sR+4/7RQTm/I+usMAGO1WzgjwnWp0PdNbHn30pBejW9dDD5WkA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id vu5-20020a05620a560500b00785500f6090si1814789qkn.724.2024.02.13.13.12.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 13:12:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64275-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=uZsom5YM; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-64275-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64275-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B2E101C221E7 for ; Tue, 13 Feb 2024 21:12:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B031C768FB; Tue, 13 Feb 2024 21:05:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="uZsom5YM"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="8sUBr5ij" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DE5071B4C for ; Tue, 13 Feb 2024 21:05:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707858313; cv=none; b=RfoTEcSdwaH/poJ56qLLHN2uhZ24eCtyYTyBgPR4ZD1jckxDodhS0HErYvgtZTq1nb8MLc53OM0a704GRKJsbO8juoWuj5i61YuB4SGKapHGslfd9G+QSY2yFdkUMw1Fh2EfLSKzlKMU7e9N9Ut+HcsZ/PihhfKq28xeBsJAYgo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707858313; c=relaxed/simple; bh=8UoXimlIZEV2eh9uv+zpNtLrnTWnYvwIjEWGdn2Rb2E=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=AvBCQrpEuLEm4TtYZmBM8NAKigf+t136sSTune5iirh5EFWZnF7mnh8XausQ7StzpTxNbIjlulFx+AcjLbbOaHVh12BczxeIsQ9YHD4i95nTysHblB1c9qI2kqX/9lAw0ge5XhP5iT8DuDTPk7EAvcupnCpfwVF4YrGJQPtKn9A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=uZsom5YM; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=8sUBr5ij; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Message-ID: <20240212154639.683073662@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1707858311; 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=21XnL3/KpVSRQX9fQR+Ss73/rrljxkqQNbU70H6SdFY=; b=uZsom5YMvj6oRMdhpTRQuI761wmJ08YSXX2TwzbaHmTl/NG46b8mHHbCV8KFBJZfGKl5cq mIEHZj41WdB+mJjaE49aenH4Annddphpw0LT1PJ12iBl/WCzCugu2EBPMIqaQkJJQ/rioh fpkmb0QogNEMesRf1RiS3xDkYnzNmn01cQ9vMnSPDpwYz8GlO3L4VJin7QoSyWnmuuMY0R zcj1KjosHA3wX6fc5E5WjlHKt0AeXtEwBG5p8w9XOD8kCQGoi4RK1xdQhZdwuZzyOAyzvJ 2pMio1KrvGLVii1XZglfLVq6jz8ler6+jMfMUwvVITzziyetLr1xmNwMEfsIhQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1707858311; 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=21XnL3/KpVSRQX9fQR+Ss73/rrljxkqQNbU70H6SdFY=; b=8sUBr5ijnUZGU/qNF8O472/7fPvXyDyD+2jquxP6o45wrPLxNMuYZR6Waak3WGb0d+689b ex0HGRggY3Pds1DQ== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Tom Lendacky , Andrew Cooper , Arjan van de Ven , Huang Rui , Juergen Gross , Dimitri Sivanich , Sohil Mehta , K Prateek Nayak , Kan Liang , Zhang Rui , "Paul E. McKenney" , Feng Tang , Andy Shevchenko , Michael Kelley , "Peter Zijlstra (Intel)" , Andy Shevchenko , Wei Liu Subject: [patch V3 14/22] x86/jailhouse: Prepare for separate mpparse callbacks References: <20240212154529.402604963@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Tue, 13 Feb 2024 22:05:10 +0100 (CET) From: Thomas Gleixner 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 } } +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; - x86_init.irqs.pre_vector_init = x86_init_noop; - x86_init.timers.timer_init = jailhouse_timer_init; - x86_init.mpparse.get_smp_config = jailhouse_get_smp_config; - x86_init.pci.arch_init = jailhouse_pci_arch_init; - - x86_platform.calibrate_cpu = jailhouse_get_tsc; - x86_platform.calibrate_tsc = jailhouse_get_tsc; - x86_platform.get_wallclock = jailhouse_get_wallclock; - x86_platform.legacy.rtc = 0; - x86_platform.legacy.warm_reset = 0; - x86_platform.legacy.i8042 = X86_LEGACY_I8042_PLATFORM_ABSENT; + x86_init.irqs.pre_vector_init = x86_init_noop; + x86_init.timers.timer_init = jailhouse_timer_init; + x86_init.mpparse.find_mptable = x86_init_noop; + x86_init.mpparse.early_parse_smp_cfg = x86_init_noop; + x86_init.mpparse.parse_smp_cfg = jailhouse_parse_smp_config; + x86_init.mpparse.get_smp_config = jailhouse_get_smp_config; + x86_init.pci.arch_init = jailhouse_pci_arch_init; + + x86_platform.calibrate_cpu = jailhouse_get_tsc; + x86_platform.calibrate_tsc = jailhouse_get_tsc; + x86_platform.get_wallclock = jailhouse_get_wallclock; + x86_platform.legacy.rtc = 0; + x86_platform.legacy.warm_reset = 0; + x86_platform.legacy.i8042 = X86_LEGACY_I8042_PLATFORM_ABSENT; - legacy_pic = &null_legacy_pic; + legacy_pic = &null_legacy_pic; - machine_ops.emergency_restart = jailhouse_no_restart; + machine_ops.emergency_restart = jailhouse_no_restart; while (pa_data) { mapping = early_memremap(pa_data, sizeof(header));