Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2585743lqp; Mon, 25 Mar 2024 03:36:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXcmoj3FTGKRfLP/7LQl2dnSRcsb5zSYh5T+nzSmbVgwANpuy/9a+mjWn6vQlZXdk1KtqPAD0GWJFvPlV0sQEbzZq1vHsom4cvcv2y0mg== X-Google-Smtp-Source: AGHT+IHRSvWVXPOEgNn1EZHHhGgpDsEz9+yqac/gKg8lNR0Ds6aK4PNT6634YwMbkAAD/rdy42HR X-Received: by 2002:a17:902:e80b:b0:1e0:a72e:2e98 with SMTP id u11-20020a170902e80b00b001e0a72e2e98mr6357803plg.27.1711362988850; Mon, 25 Mar 2024 03:36:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711362988; cv=pass; d=google.com; s=arc-20160816; b=GGP2e5PkEx+d5mP84MGS2A81+5Yt2aon40b7mWCfDnJkJ8BN68m5NSyIjlyNL4kdyq rNGGe4PXhvSY5zAA8b890tkxN73f69NKIQ6QPhh8/NDNEOmCK9TNT5Axx9Pe/GW5ZfIo OTZdiqcdZIyz6OVD+TaflbOD7v7RyCuPGPomT5MYNueliNU+cxFDzFoZS+R4AEzlrbJa 9VDQWwEzGy7B30M6waSGndq7M/2c1js9nqu5F4B0YXI2o0V6rsgT7o2xbCIE0gHVoheI JH5ACor2LgMx3r6EO4FZeGaqNX5J6bqx9eh19eKnafnYacyKokQxE3YRaU2LCBmCa2eJ 4TWw== 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=F4+0HI6D+Zw1MPCTfED+SaQho8sePYWXOsxPTtEWFf0=; b=TFYuctLeyw1EQPxzLkJF80IRoPW2mBIXYw4gaXD2DIsg0GtfuXOU1TwpCkpOQ+NJ3x rL0FFd1ZLl469XpGVlC/iJDCBKoGPzZeHK6n3GfZ2jw/0vaJOg7jtXVGe+4KpJPIoY4o NfqQarllICXU1jc7e8O6+7fSkE416Y+XDfoBo1DjwdaxJoefWRMOFkMUQSOk5RPNSU6Z F1XfKXLcxeXl7ZiMBTW2z0mo8yM0U4OMe0RYra5VTf/XGlzWnWbH94c2VT05HgiiY2Se snpdAg0uq/e+yvBNNMc8OqJ9jDKg9ud0MNiO6dwVd8g8VByDWk4AUSJivn/yPIKS4XY2 xhkQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a63LtQ44; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115294-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115294-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 q13-20020a170902a3cd00b001dd8af2a0c3si4828732plb.110.2024.03.25.03.36.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 03:36:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115294-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=a63LtQ44; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115294-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115294-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 EF1A829B471 for ; Mon, 25 Mar 2024 10:30:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 105A11D4C5E; Mon, 25 Mar 2024 02:32:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="a63LtQ44" 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 4007A80055; Sun, 24 Mar 2024 22:48:31 +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=1711320511; cv=none; b=Mlkfun4GE42+PGB/7Ao2BaZyZMcaEqm1Ec/lb3bkei66KEAMUnM0bJlZqJX+l6eWmDo1GoO16wFg14aPITWjf+/90+Zd06mISmdlHSNSY09yQoVLcVgByvBTECl1Knsg/bmTNWvFt48MWkGoPqc8LcUXHCB6zwIkOyb9l8e4l7Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320511; c=relaxed/simple; bh=d3YjCGegKBiNlaqnlaRwjobA7R6W5+YKEQ2B++yBx3M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dFfk2MsR2R0AGSrPV9ppBhde5cdAvvq44W4+jGoXn7T4Ho0+f0WHlI9l+uUWRwzGwSJDD9ukZotR91XOeoT/MBUhI3UnVn26SDT16+n8pFwxUY7ACkT6Z2bfdTPfhEstQ0xn4epOj2ho+rRoWYhQJK1zdRHN5ROZlaCDMhLyC9k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=a63LtQ44; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60A1BC433C7; Sun, 24 Mar 2024 22:48:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320511; bh=d3YjCGegKBiNlaqnlaRwjobA7R6W5+YKEQ2B++yBx3M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a63LtQ44XNG1WBdCJadl0NmlZG0y9zcmAlUtVbAly1Ba4VOpN5S3CqpDGRaZdOnuV DMWNcrGh9gLYL79v2ft54s22xynCF8zAIE10JjHUBczIrFUUYmuUYngGDhHWL+MMKH zUZtv4eAxpf/mgP9jtPP7J1w2hkFHVUJfuOLRVnK2LR8Tok+/s4GO1keMCIhYMuiZu T2PkwIYF90cmGMuZMMSgXQFw7AsaTZZxXXUSrIAfaObcbgMBdpz72iCG/nFK+sc37j wF/UzsUXxKwQVoXg5znBQ5Ig2XQK+yg7D+oCCaiCFrEhH1OTRYZXfcMsBi3X/pyjdW +ULDwC2idf/xw== 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.7 071/713] x86/hyperv: Allow 15-bit APIC IDs for VTL platforms Date: Sun, 24 Mar 2024 18:36:37 -0400 Message-ID: <20240324224720.1345309-72-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324224720.1345309-1-sashal@kernel.org> References: <20240324224720.1345309-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: 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