Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp3243316rdd; Sun, 14 Jan 2024 01:24:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IEZtrYzpmcyNWI07mepRuURaR66NYrXCfWPwBkgBZ7jxn5SqTiSy29zE6BuhDMk8FxepyHW X-Received: by 2002:a05:600c:220f:b0:40e:7546:243a with SMTP id z15-20020a05600c220f00b0040e7546243amr205565wml.188.1705224286781; Sun, 14 Jan 2024 01:24:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705224286; cv=none; d=google.com; s=arc-20160816; b=XMijSPVfTKfAQNtfOD7HRv6Z/my78xW4pAcb8Q5jjE6eYwKvjw0/XpvN0byQ8qGk/3 FiF8hdwHLVF0Ns8gDTP1DSn26ByWjmGkuys5tDEjD9OVbfeX5CKdDadiVMCmkXe6E+DP i5cLVRSYLLpb5xqQh6eF6nktl2fuLbu+Mc48xgkK+5asPdDXEGgPcW6Zg1FTJldVh8/v Bha0ZgxtJMID+fG39w1cZVMtHh9uVY3/oQ20Tmm/XqrX02wZTYShMZ5UL8ZYzW0Y6P8W jBmkCCPjjtnMQgQ3TiIGSgo67Vo/vsRaQPQOmDsIh5nsdAXRbuB30EuoBj3yM3c459EY u1vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature:dkim-filter; bh=8BKEv879DQ/t/fqtxbNzOd/OELYyxrygiQU/Tuj80Dc=; fh=p1lzuZu/YdIFOEFrZaIQqD2s8Z9Frkbqs01a6b7h73M=; b=jxpgHrlKAHwIKpEX6UmBOEEUwUD9aCI0YlwOHr+Vqj9o5CADLf97wLhDjiSyjLRlvx 1ctYJHrIA8buNMTeKywQSkowYeTVptMq1ES2UqQEBJSbAXRaRHyRMHFMstBvTZK8DkbL esUuC58iV9tjPaFZ+0Tkg5c1mVFhAO80CjEKecRJ8pHtPOQC3aLL+sypzh2UI0ugFsuZ M4S57sa4dFsZ15+/VLbENrm6SClXXtKw095i9zcRkSVvppFmP/g1vqqw/JvTB7vAF2gi 1zGVCR+n7FsisFyDygOw+Ya7C+1R6zzAjwyvTg+STxbq5YeJBILMZQ1Fyf5+6ckeQitp rSPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=WZh0HSUh; spf=pass (google.com: domain of linux-kernel+bounces-25430-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25430-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id v16-20020a056402185000b0055820acd5b6si2866611edy.568.2024.01.14.01.24.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jan 2024 01:24:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25430-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=WZh0HSUh; spf=pass (google.com: domain of linux-kernel+bounces-25430-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25430-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 82CC31F21C6F for ; Sun, 14 Jan 2024 09:24:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A10301FC8; Sun, 14 Jan 2024 09:24:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="WZh0HSUh" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 81F741C17; Sun, 14 Jan 2024 09:24:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Received: by linux.microsoft.com (Postfix, from userid 1127) id DBD0720C80B9; Sun, 14 Jan 2024 01:24:30 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DBD0720C80B9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1705224270; bh=8BKEv879DQ/t/fqtxbNzOd/OELYyxrygiQU/Tuj80Dc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WZh0HSUhKTUM4BQXCarsMaJa6wUVji3H7VVPOAaABsvGyW3qFlRHZ4SUunxluj0HN jJcGQl5AVyIWxHD9hUE4waVNe5EklQzgSMieGDRg1vNrhJz5bDNURtK6LA53/mi/Hj skVs7KBhHHddFXCccvzW0Jv98dYjuQ9TVWDK7obc= Date: Sun, 14 Jan 2024 01:24:30 -0800 From: Saurabh Singh Sengar To: Michael Kelley Cc: "kys@microsoft.com" , "haiyangz@microsoft.com" , "wei.liu@kernel.org" , "decui@microsoft.com" , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "hpa@zytor.com" , "linux-hyperv@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "ssengar@microsoft.com" Subject: Re: [PATCH] x86/hyperv: Allow 15-bit APIC IDs for VTL platforms Message-ID: <20240114092430.GA13684@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1704450566-26576-1-git-send-email-ssengar@linux.microsoft.com> 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=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) On Wed, Jan 10, 2024 at 05:10:47AM +0000, Michael Kelley wrote: > From: Saurabh Sengar Sent: Friday, January 5, 2024 2:29 AM > > > > 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 now deemed safe, as no > > architectural MSIs are employed at higher VTLs. > > I'm trying to fully understand this last sentence. It has the words > "now" and "deemed" as qualifiers. Can you say anything more about > why "now" (implying it wasn't safe at some point in the past)? > And what are the implications of "deemed"? Or are both just > wordiness, and it would be just as good to say "This assumption is safe, > as Hyper-V does not employ any architectural MSIs at higher VTLs." ? > > The code LGTM. Thank you for your review. Your phrasing appears better to me. I will revise the commit message as per your suggestions and submit V2. - Saurabh > > Michael > > > > > This unblocks startup of VTL2 environments with more than 256 CPUs. > > > > Signed-off-by: Saurabh Sengar > > --- > > 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 539c7b5cfa2b..1c225362f88e 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"); > > @@ -39,6 +44,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.25.1 > > >