Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1171388rdb; Fri, 16 Feb 2024 07:24:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX+OBBsclpQOP5K7AeTCUE+ul+Mww4LnrW0+QFF/YNzTPLA6gx0PwpLc5FfKnXTgu42nP1jLOvhGOZGWrXhlr3l6cde3dDozqyQMA6/7Q== X-Google-Smtp-Source: AGHT+IEqZmQZxfaLQn0fA/tscXqa1qNnbWUrCsvkpwb1keHlpj2r848APx8Wbl7FwYIJ2vjL8mp7 X-Received: by 2002:a05:6870:d628:b0:21a:16a5:5334 with SMTP id a40-20020a056870d62800b0021a16a55334mr5443098oaq.0.1708097050075; Fri, 16 Feb 2024 07:24:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708097050; cv=pass; d=google.com; s=arc-20160816; b=nXGNYA0ZUefcn4umXyftR3yu+EG/plI8Cgsz2DAx+lGc/adi+MKPzi3owiYs0SlL13 BjGqv7mUAMOOE4jm3dlp+rpYnqpYL3Iu0dhdWii8ZhAHlRq6yv08mGPYRfGsA2/kOcjy Rm9/8hK+e72LAxQNC/laW68w/06R2zDaRHX9WhRjxMZzn2V90NNTJ5aP19tU8t4PQdWB jSLzBhVL5kEMJG7i/4o7aav2wTHi/JanMBJsPuSLgsBKu+4MTPKFlYKWkDZB2DU4sxRI gxXspERrtqZAkKwCr5hiF4l/Jjv2EPqsgD0Pksz8Fj9W/qjz287XyrkYvYxuI4t7+nnv 8k4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=A5zBwfjnIxMZKYLYMFarpQy16iShzShdaoU7j0JFddc=; fh=HfXWoIhgCc+vt39DMIJv/Ec0aAKnw0eFA8QxuIQTUoQ=; b=qh2Sj2Zwm18F1tCaMDdCfCx2Yy6kaa+kMZyUPiCX0qsgGA6wq+tar9KrjBwLK45eDJ 9UOabV2upur/1mwjolMkfVYGM82hUKyil980JkLPz51xRbEWtw+hJD94trSJS7ND7fzf Bmc+iiXS4CAsM/nxnYxm3Yq8GGvMfF1/n9Fz3uNoWWDZOpznQwHwRwAYkf7b4Dfp1VQx js+5cvEof64FEjW5WaSkSe8J3Se03O1/onGOItLal260I/sf58p7NlIUEPU16vIiUw+o It5Dj11ijM3LBE0/sAQoCOu+n0fI0nSCuf0ygGz5gZqJB4YQOO9iWgpqigmkzD2ACINa 9N7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=SfF7TCCo; 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-68828-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68828-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id e26-20020ac5c99a000000b004c025e4cdd5si81368vkm.43.2024.02.16.07.24.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 07:24:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68828-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=SfF7TCCo; 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-68828-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68828-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 C4CFC1C220AE for ; Fri, 16 Feb 2024 15:24:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C4C611487C7; Fri, 16 Feb 2024 15:17:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="SfF7TCCo"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="pnZQSbGW" 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 D1D75146001; Fri, 16 Feb 2024 15:17:17 +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=1708096639; cv=none; b=nydoQL8qr+0oxzJFsoXQo/dVrmWpAx7s0Ub335xIEXpTH2La821hSo8+X+YBvM1CWws9vFaeleFLlWe6aU+Klhq+aWq/7fiEI+k4PZniHMxBBJxLQkrVrZ0U12PKdAfq8MqYIk0AIaFnCcT7ArTUC5UWSrA/IiRwGWIZYYWIYaA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708096639; c=relaxed/simple; bh=eYeI2pOm6P80UWbWK5vXNZ7z3fJYCF7/eTqS0BQZ7GU=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=uLUduogLJEH+mxH8/G+jOljzFLOOk3/YDfiLNWL+Mllpe8zrDzq0JMtR1GU6RH7qOsJEhcO+dx6t7zQoHkhPml5B4Tu+2/IXo43fu2QM9JqgLn3DZGgSJ1oAOlNhy4vP2MCCuC2/08YaF79w/1WdASmj44M6VcEPPjwxxNciZTw= 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=SfF7TCCo; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=pnZQSbGW; 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 Date: Fri, 16 Feb 2024 15:17:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708096636; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A5zBwfjnIxMZKYLYMFarpQy16iShzShdaoU7j0JFddc=; b=SfF7TCCojWTFCDhQnZHZrNAO9SLBBjlh+QUZETYSXb7KUyveAMe2tS23GKeWNwYKNE8lkc r1Yxzb+ByzLl5I6LnQa+ITFaMndiELzF/q2g9pMpZIyrzNZJy1JXObQcp5hekNJZEVEwl+ emK/ma+jQQy0kHPRK5CtL6RrfC8c3zFFwULwPJMsx/VVa36hQwSrfjbTSfu0QC9szhTlmb VwZSb9PSxw+FwQ6yj4QZO4jMfmNIHlXduiLqIBLpJYENJWZy/BWaXT4uGt/XDOhb12GK6J 7JFy+seOxKodQcgcPVS3hEJs2tl1H28ClTpG9vzf3SMffBlX8UylSIdPL4MNbg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708096636; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A5zBwfjnIxMZKYLYMFarpQy16iShzShdaoU7j0JFddc=; b=pnZQSbGWNFrv2iJkjEsu63MdXOI2iRef79OHrFqUYOmlw9InAcp+APqSYxiNTsWuuZeKmx dpQN9ObJCdfNjAAg== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/apic] x86/jailhouse: Prepare for separate mpparse callbacks Cc: Thomas Gleixner , Michael Kelley , Sohil Mehta , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240212154639.683073662@linutronix.de> References: <20240212154639.683073662@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170809663556.398.5687023151563142285.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the x86/apic branch of tip: Commit-ID: 30c928691ce1c861d22ef236ed28bbf0b7a763bc Gitweb: https://git.kernel.org/tip/30c928691ce1c861d22ef236ed28bbf0b7a763bc Author: Thomas Gleixner AuthorDate: Tue, 13 Feb 2024 22:05:10 +01:00 Committer: Thomas Gleixner CommitterDate: Thu, 15 Feb 2024 22:07:40 +01:00 x86/jailhouse: Prepare for separate mpparse callbacks 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 Tested-by: Michael Kelley Tested-by: Sohil Mehta Link: https://lore.kernel.org/r/20240212154639.683073662@linutronix.de --- arch/x86/kernel/jailhouse.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/arch/x86/kernel/jailhouse.c b/arch/x86/kernel/jailhouse.c index 578d16f..6d663af 100644 --- a/arch/x86/kernel/jailhouse.c +++ b/arch/x86/kernel/jailhouse.c @@ -118,6 +118,11 @@ static void __init jailhouse_get_smp_config(unsigned int early) } } +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_platform(void) 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_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; + 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));