From nobody Fri Dec 19 21:56:58 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A19731FDB33; Sun, 24 Mar 2024 23:02:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711321336; cv=none; b=VUjnYmie0vTUL1qVvnb2XD3x7vnm7DhMKK2p12nGwx/e0uPNfawwRhgw7pXD6P1EMlvem98xrOQHjDrq69qVfelmvelx3yKIG+9Or+XdzqUe1+KR54TV6hQQ+iQcM63CrC8G2wKuHg2e+VKnuo5egX5BHyVvb6iJKqZoKPbZ3YE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711321336; c=relaxed/simple; bh=nhPGpmoDAeeDi2S+ayEK3AhjJxr2UCqdWzDa0/q9ix0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IgOplHpLI5nYTMTvEkI0QcdNi+QHxhH6OFnocO6MtCPMVsWH8ffl5WWoo7LeU+lExFLHUeNPwuvnUfo+K4rzsdUqrM3dqu12aRve9BE/qBq3daZ5vl9qy7f8LbXZTQ6kaQDBtDkp+uLagXgEjbOTdrd5akiWViWsNyfMfxqtwLM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=knkLqnCr; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="knkLqnCr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C84B4C433C7; Sun, 24 Mar 2024 23:02:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711321335; bh=nhPGpmoDAeeDi2S+ayEK3AhjJxr2UCqdWzDa0/q9ix0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=knkLqnCrXSfUG1OM7iHBgTcGcyrSLIgyXhy9lYqyKF2dJ8Ef24WhkcJYvodvsId+m fqQvjRtbU3MRyHZXm7036IK5AXKZbG6hCgZfEFwfh6mlju4b2MJmWbA+6a5moN12Pl wmJRGfD1RItPNWEC3WA4JvWsZ6CK9emchC9HgfQCjpFr9H6XxDQCri/ybbQW0LVvfi RPwoT/zJ7W2AK1mjO56HRI4z2AnY9p/514vMR0IHYn5KuOj4BlQQd9aVGMZISbJ5Jl 2IllQ4YEbLQbMOyKP1H+HGJHkPrssWyNGXhBfgClnVz0eEt/SSrkUaxHIRGlHJjeG5 e+D8S9+2LY9JA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Saurabh Sengar , Michael Kelley , Wei Liu , Sasha Levin Subject: [PATCH 6.6 059/638] x86/hyperv: Allow 15-bit APIC IDs for VTL platforms Date: Sun, 24 Mar 2024 18:51:36 -0400 Message-ID: <20240324230116.1348576-60-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324230116.1348576-1-sashal@kernel.org> References: <20240324230116.1348576-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Saurabh Sengar [ Upstream commit 0d63e4c0ebc2b5c329babde44fd61d3f08db814d ] The current method for signaling the compatibility of a Hyper-V host with MSIs featuring 15-bit APIC IDs relies on a synthetic cpuid leaf. However, for higher VTLs, this leaf is not reported, due to the absence of an IO-APIC. As an alternative, assume that when running at a high VTL, the host supports 15-bit APIC IDs. This assumption is safe, as Hyper-V does not employ any architectural MSIs at higher VTLs This unblocks startup of VTL2 environments with more than 256 CPUs. Signed-off-by: Saurabh Sengar Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1705341460-18394-1-git-send-email-ssengar@l= inux.microsoft.com Signed-off-by: Wei Liu Message-ID: <1705341460-18394-1-git-send-email-ssengar@linux.microsoft.com> Signed-off-by: Sasha Levin --- arch/x86/hyperv/hv_vtl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/x86/hyperv/hv_vtl.c b/arch/x86/hyperv/hv_vtl.c index 999f5ac82fe90..53b309d41b3b9 100644 --- a/arch/x86/hyperv/hv_vtl.c +++ b/arch/x86/hyperv/hv_vtl.c @@ -16,6 +16,11 @@ extern struct boot_params boot_params; static struct real_mode_header hv_vtl_real_mode_header; =20 +static bool __init hv_vtl_msi_ext_dest_id(void) +{ + return true; +} + void __init hv_vtl_init_platform(void) { pr_info("Linux runs in Hyper-V Virtual Trust Level\n"); @@ -38,6 +43,8 @@ void __init hv_vtl_init_platform(void) x86_platform.legacy.warm_reset =3D 0; x86_platform.legacy.reserve_bios_regions =3D 0; x86_platform.legacy.devices.pnpbios =3D 0; + + x86_init.hyper.msi_ext_dest_id =3D hv_vtl_msi_ext_dest_id; } =20 static inline u64 hv_vtl_system_desc_base(struct ldttss_desc *desc) --=20 2.43.0