Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp608119lql; Mon, 11 Mar 2024 11:48:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX/kQFEGuIoppdL+H3CYg+BLGVU4na8f7xf64eSAIIpZI7XO8C7p6JwP9XNiiz+w5qro5yDzpfm0jeny6zDV9axQFOj4sKOq7iMsJrYAg== X-Google-Smtp-Source: AGHT+IHIoaTxWx1sg/r2hw1JjBM2gK7aTNhlTro6fE2AnqAl9ti7xT7thh5KB7ICewI2ibgNYNyc X-Received: by 2002:a17:90b:4b46:b0:29b:fb86:7785 with SMTP id mi6-20020a17090b4b4600b0029bfb867785mr3242887pjb.9.1710182879775; Mon, 11 Mar 2024 11:47:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710182879; cv=pass; d=google.com; s=arc-20160816; b=b07pRrXsm4erj/XXJz8TeFGhwdJUWM5ntQ8tsf1RjfdpsKZRRbPfH/IhVTFjwxqizI uNgAPSaI7N0DDXf6o0CnXoBerh+1bluuyUikVack2qoAsgHre3vt/1zl3h5eWD19Gmbl jtENP174TuQgwu5QpxOeo6Z9VZrBARnTQnDg9I3aLOoFIUrMx2F+Yx7g6H0Ar8Sx0B4e pjThD7KFuIFH4chHh9tnehGsbPSWRMYFzE+wjFIxYYgSvIPZSMD5NnzH28ivIBOxjNmI jl9sOHio8dpsEg9fUYhOWxjdsuxdeJpAUL4kBHHz3ED0c5mOLDOYfvOCHysAqzSoSp4N bDtg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=C0vXq3HQJBUn56aLzEnycwfcpT+OrAH2zTx8prEVttM=; fh=hvp9uZTQVQDvucgVc9ozyAFKmsuYkRl9k3hirvLfcbQ=; b=kkubrmmWrU0Dl8eChh/SG5IGZFNkXjzO0jlAAk0uYJUqxzrJrKhCcwbZzJ6pCWsUXX ZUAnaDi2t/O6EaUITUZhYYpEkLpY1Yht/5jJNA4kb8AiXWkSv5gfDqoLrzHJjcqUBPXz ZVPL9rST7Stvc7kryg13L+8t47rN+nntLj9fvA+Jt+qYXqhaNvew+FOPZc87qCA2/MYz ZoJQA4CbEet+viv8jvWIZfLTZEU4aYfEDIJgOsl/85JSEWwCzXNW4mOeA2dlGRsWUUZc 584wWbjRJEByjAM35fdgoKek4Q8wxcolVfc1vDynztrp92zEaB30FHtBFrM4yyKzN5TL o+dQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DU5+xj9a; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-99378-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99378-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id g8-20020a17090a128800b0029ba373e93esi8157774pja.43.2024.03.11.11.47.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 11:47:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-99378-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DU5+xj9a; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-99378-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99378-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 9A746285864 for ; Mon, 11 Mar 2024 18:38:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B10B154F91; Mon, 11 Mar 2024 18:36:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DU5+xj9a" 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 D7B9C54F92; Mon, 11 Mar 2024 18:36:42 +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=1710182202; cv=none; b=YwTd+zpC8z+G8dTERm66/Pjz63p1tGio84giokVYHI/AcGEgjgvHdSp4q9Q957ww4DXhuFDkA0slk10RUh0g79FO21gTb8tZraEpfGMfh0x8HAvk/bNdMusq0Bof6XTUs3rN2/uC9TEeYyzyRKFiCWYXOkJetOzueQIzJUI4WS4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710182202; c=relaxed/simple; bh=d3YjCGegKBiNlaqnlaRwjobA7R6W5+YKEQ2B++yBx3M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Lex22auwmzB3CI4+R8OnSjEnyKv/AQHDZrJCvbhJlB3Xfb3BOD85k5bd6QWPR4rzucY+4zIfnnVapXcVI/eOfhB9Vzj10al7MQX4QFpEGGoalWcAYsV6BPuT742BlzS1LV+iQP9JvY61+Et3XsKmOdCakYQ6FqItSdpvHCmo6OA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DU5+xj9a; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 135C2C433B1; Mon, 11 Mar 2024 18:36:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710182202; bh=d3YjCGegKBiNlaqnlaRwjobA7R6W5+YKEQ2B++yBx3M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DU5+xj9a0ciaoyGi6PbqdB/IvKkrzlGFksa8r1LshjvX3P+5OnwnYbxhmDYDd9IpI pqnV82dYwPM+99jCLBsbo4fJ7OsKlExT6yUWc+t5kmhcGqWwzgYSYcKarAITgwE78h 9e10cotB/TpexgnzVLoo+SWUpRfKswDDVio6mx99JZl1A0Ziq8/R4n+Cs1ahN0c85P HzIdJQ3HH7MN9Dv0STXcgh0f8l+UO1eI9oWW5vHCLDpTHFage1vaUyt7/KM3xx765T JmMi6ZJVFYhg5JdDtWF1BrnIAHlTUf1ItME7HhjZaHPfprx2zxXyR4RaK2wqZ6AoIM JFPtOA2y/fjnA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Saurabh Sengar , Michael Kelley , Wei Liu , Sasha Levin , kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, devel@linuxdriverproject.org Subject: [PATCH AUTOSEL 6.7 04/14] x86/hyperv: Allow 15-bit APIC IDs for VTL platforms Date: Mon, 11 Mar 2024 14:36:07 -0400 Message-ID: <20240311183618.327694-4-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240311183618.327694-1-sashal@kernel.org> References: <20240311183618.327694-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 X-stable-base: Linux 6.7.9 Content-Transfer-Encoding: 8bit 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@linux.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 96e6c51515f50..cf1b78cb2d043 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; +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 = 0; x86_platform.legacy.reserve_bios_regions = 0; x86_platform.legacy.devices.pnpbios = 0; + + x86_init.hyper.msi_ext_dest_id = hv_vtl_msi_ext_dest_id; } static inline u64 hv_vtl_system_desc_base(struct ldttss_desc *desc) -- 2.43.0