Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp999066rdd; Wed, 10 Jan 2024 05:59:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IHrS4plirtz6vBvyNZDx8m8OLIYV7Vbnc2zpBgFhtpz6pPQXzdj32yJpR7dPuzsmcOMkmpL X-Received: by 2002:a17:902:a50a:b0:1d5:5c30:9456 with SMTP id s10-20020a170902a50a00b001d55c309456mr727900plq.65.1704895178198; Wed, 10 Jan 2024 05:59:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704895178; cv=none; d=google.com; s=arc-20160816; b=Z572bx5h/jmC0tBQFGm6Az0fwrX7a111vN5ACPVN04Yah33Dc6V1MF7FqDV22TLRJL aI5bDCfoLShPJ3rpwmwGMB9yACycx6FShWB/7+jCK+nS3iPy30xiAqAg3aT5G5UBKIM0 8vMTTC5xWU/xGGFTZcNqqQIXwdw22t2ajOoidrreudX4A/crAXrtrKSJj1UYWRazn/Kv BUMZIxhW7EKPaV/vRPgAGkRnbRNGx2aLMkYT31R4MqyOzPCnxdvrG9RRL7hLMoyMli3u UooUxRHQP1KuTGNmTmuwF2xLqwpl40shIwBKJJy9Fd8hLpJmR4YrV3WYhq7LPqkrqCqE 8mxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=qLF+8HQzMDDK3mYkGACeVLM+vDBicJwXAByQZFsnG0M=; fh=QqYH5RpzGE6Czf/rNKesQDMQX6uMp7FzEU2Tl/rcwBs=; b=Iexx4fEzSzVdRFerE1Pzcb2ub1OKIzu5yzgDljgaqxkY7XGRY/rr+hRG2BfE3pjjbk di0joFfb1jBnPg1zJ9AVIbfWps3LBhgh/+bhzp4mLXNC7rhHjUxcJnmimHXxmA0an/IN VoqnIO/rALx6uERbYgpTFGlilvOss9ORF7Gv3cfW2nM10U1bCOacqJ3h0Hk4HhRcFW9Y jjiqPYUulDq5lygPAKNfiwt87TA6eoGJPX+xFkheVrPFfJ0ksW+zYrOp8DcBX2hvKtG/ 0DdOzRs9bLRSstokkJYK6K//XCprjogm6m58rm4/YsdVA+wdTqH2PARj0WC3LlzbEIfa Js2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=eTVN1lrL; spf=pass (google.com: domain of linux-kernel+bounces-22292-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22292-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d12-20020a170902cecc00b001d076ffeecdsi3968136plg.198.2024.01.10.05.59.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 05:59:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22292-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=eTVN1lrL; spf=pass (google.com: domain of linux-kernel+bounces-22292-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22292-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D4D8E284CDE for ; Wed, 10 Jan 2024 13:59:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 01C9A495E6; Wed, 10 Jan 2024 13:59:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="eTVN1lrL" Received: from mail-pf1-f201.google.com (mail-pf1-f201.google.com [209.85.210.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C4D0495C5 for ; Wed, 10 Jan 2024 13:59:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Received: by mail-pf1-f201.google.com with SMTP id d2e1a72fcca58-6d9c7de04d0so2826700b3a.1 for ; Wed, 10 Jan 2024 05:59:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1704895165; x=1705499965; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=qLF+8HQzMDDK3mYkGACeVLM+vDBicJwXAByQZFsnG0M=; b=eTVN1lrLwvmSKGhDVIMSEdvSRkyQVFrrfBSTSO0eaqJbWjrOe5q8QmfrTw3M4PmwJw mBM+ffgZQX1d5iI3YERmGM9sWXRYd9WO7S9g1qm+CKwiHlZ7pj/FYH3B/Amsp+OhJpyQ p/hOf7flOSDVJ5mfR4vFRVhu0hl7ZA53Lc1V9vvqQrvvDnK1H35sw2WVnL0wOJdIycfh A2QOAzAFWbB+RziO/MJ75Vxg20ceLDaNrIq1v5qv+QcAIhNKV+lam4IjXAO1dHHd9ddT kQz5ua1R6NJ4d21qYMhKH73rvNkNpaiTdR2bQ8t77UK+8c5CT/UiNa2PYhyDZPZn7+wB MBaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704895165; x=1705499965; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qLF+8HQzMDDK3mYkGACeVLM+vDBicJwXAByQZFsnG0M=; b=gP9+kfOay9t6Zlzb4EPPF2fKuWCJcalnrBSd/shQ7lYoFsQvdlY5o+ujk+eNzSi8WA yZlQguvmDeHhnClsAe9y+Cn9CGmRTmdrhUhdDPXvKhHyD1oByp1dYffWG0+xWT8pEEA/ JelF+gQ9mBhc8hi2NRDlJRu6O5QF6jwVAI454prnUjcFj1/KFbeiRkeUwrmY9vKZCg0W xQwArZK13R+YyI8x1olNrv/RHPwq9KEQJOswBvfaEpxG4HcV+b9g198v+sz2ZhFom0R+ LYeLZVpIa7+OEu4vn5PILv9CEBtKHOiCyQqmjE/oEf/dzMoAIr/ikLvuWq3bIfbrMGEY IquQ== X-Gm-Message-State: AOJu0Yz6o220lJwazaR0KCp5NUjQYHbyVc5nQoNZBtA8/ONY52BGSEkz qSAceC7LQcwrzBvFYEmyVUqBCC0mDIxFfl1Ehw== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:6a00:887:b0:6da:83a2:1d95 with SMTP id q7-20020a056a00088700b006da83a21d95mr136621pfj.0.1704895165332; Wed, 10 Jan 2024 05:59:25 -0800 (PST) Date: Wed, 10 Jan 2024 05:59:23 -0800 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240110002340.485595-1-seanjc@google.com> Message-ID: Subject: Re: [PATCH] x86/cpu: Add a VMX flag to enumerate 5-level EPT support to userspace From: Sean Christopherson To: Tao Su Cc: Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Yi Lai , Xudong Hao Content-Type: text/plain; charset="us-ascii" On Wed, Jan 10, 2024, Tao Su wrote: > On Tue, Jan 09, 2024 at 04:23:40PM -0800, Sean Christopherson wrote: > > Add a VMX flag in /proc/cpuinfo, ept_5level, so that userspace can query > > whether or not the CPU supports 5-level EPT paging. EPT capabilities are > > enumerated via MSR, i.e. aren't accessible to userspace without help from > > the kernel, and knowing whether or not 5-level EPT is supported is sadly > > necessary for userspace to correctly configure KVM VMs. > > > > When EPT is enabled, bits 51:49 of guest physical addresses are consumed > > nit: s/49/48 Argh, you even pointed that out before too. Thanks!