Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3503057pxb; Mon, 4 Apr 2022 19:04:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZjnUZthXEecxiQbP+4OiUGL0fXWwLWMtaRqrBmm6E+DuxStvCZUx6Vo4ic984KSCCrGyX X-Received: by 2002:a17:902:8f94:b0:151:64c5:7759 with SMTP id z20-20020a1709028f9400b0015164c57759mr1201592plo.4.1649124261739; Mon, 04 Apr 2022 19:04:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649124261; cv=none; d=google.com; s=arc-20160816; b=rD2obvxut6atT10QRwontvmIohDjJfj2rzzp/xo/U/VUa0cvb77n5/xzHoh+S6mU50 NrnXsbrFBkRxxpyvojlURRFfLSez+980c2djemxo/5FsCTWx8NRwB4XbG6gVS8OUrfVz Oo5+nPnWkSB9IsdJ4Zk8M+FrDes9mUAgcGOuNrIhLjbfBuH/YatsyaJ2ylD5ipw54p42 qKcF+dAK4aBviRYdphik0OUwz+sf/trVKFOgFvnOGNTCsJ8O0VwVb73WyvR1vgQEJ0R3 PyAWp3lR5nESbBO6jdwBrKFvhhAs+r84cxPFD/tOwxQRCif+++v5wrOZT6GWTOQJ3IWa uaKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mHLh8My82O30ijWT2CaqlkU7mxd2+At9ryY0q+QdE1E=; b=cXlhSSLmp5c9f2AgUvgz7eK7YAqf5W+b5gb7H/T0fSGH+j64xnObsnO6za43VtDpRp BG9jJWwXm+D2NaAxr4YpfmS5dj630UqcPEksv8sDln7+6XfCaZE8mugSk8R7nxxfBhIx pI6BVdE7xCYpYn7uiui7IKoX8pbblDwk13MwbcrkRk3YhPZ2Kp0lsE77lN5AN3hQOJ6h EEkQYe8bKMmN2SdxglcHEPqG+iX8BZ8XDuH7OgNJfMDvK9ImTY8wpSa+RtaOJ2HZcFzP xjAEjJnRU46q5qu6RmzdH6ON5njFIDA4ZzBM0fyPtCGKSHshtnAvuIgqzKXJhBu2LKH6 P0JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=B762xOIZ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id q22-20020a17090aa01600b001c650f7fa7esi602418pjp.48.2022.04.04.19.04.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 19:04:21 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=B762xOIZ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 309C2215448; Mon, 4 Apr 2022 17:27:42 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352678AbiDAUzU (ORCPT + 99 others); Fri, 1 Apr 2022 16:55:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352548AbiDAUzR (ORCPT ); Fri, 1 Apr 2022 16:55:17 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07974BF65 for ; Fri, 1 Apr 2022 13:53:24 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id h23-20020a17090a051700b001c9c1dd3acbso3583559pjh.3 for ; Fri, 01 Apr 2022 13:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mHLh8My82O30ijWT2CaqlkU7mxd2+At9ryY0q+QdE1E=; b=B762xOIZU8w1otSUFbNgZa11LhxJXQ0WaaMSTXleOWdrxn9gvmtla0RQjvL8i2vAph 05dEOmTrgqdnXdXmb4/X1eLRb+j3UVksXXBWnwFrSD+azG3dmUJ8HtkR+PF6xYH0wbYh ZKzgNGnZn7qmAoSsHUNTVN6J890SI4yH+W52bdgg4iz8C5KdTyDnG5FFfyBUFu03yeFm bWFAznFpm9+cNnp9LbaGOuqs4nqkBBeCnvNA+J5WoHmwb/mmsVG70dUNydI9xg0ESfCX Fs2i1a3fyyVU5Aq61YQtzTvmctv7NE7VTByO9kaU/ai11XFZyxfpgqgJA5l8pQ3MK96d csmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mHLh8My82O30ijWT2CaqlkU7mxd2+At9ryY0q+QdE1E=; b=VrBW6JYeRYv0sww4tzv6G610qWh9hLMdikEo/UZZA+e5OlMbji25dgGfphi1gQgnkx JfWE+t1wUtiQC26ala25LXcCHB1j5Zqcn6e79ejeKPMzwjYcQiYIuQSjMYEMkU0SEFOm +lglZ5vsgbSKkmFKY73ViuLu5lAWJ27ko3q7PVuNDTKuXDiXyH1Ll5iDnpvnrZZvE+dm N8LmucjH2JdPlsEpQW1xJ8ZWAML4f+csKOofj9dye8klptLc/L/gpwVrZCOoWe5vvXWe 89/+CeCo4RAP2RayTSf5fpJLc5cLckaNrtrs2B5i4tYgWfz5Bz7ZG0Pf/9pu7FnaB05x LCeA== X-Gm-Message-State: AOAM532JpF+uPsTJS0vrYxqvQjHc2VT65qaVIowWrCDy1e7YtN9ijLOX x5mhCmRdJinvzBlNmiqOLzUeXQ== X-Received: by 2002:a17:90b:4b02:b0:1c7:1bc3:690b with SMTP id lx2-20020a17090b4b0200b001c71bc3690bmr13920857pjb.174.1648846403298; Fri, 01 Apr 2022 13:53:23 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id l2-20020a056a0016c200b004f7e3181a41sm4182824pfc.98.2022.04.01.13.53.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Apr 2022 13:53:22 -0700 (PDT) Date: Fri, 1 Apr 2022 20:53:19 +0000 From: Sean Christopherson To: Isaku Yamahata Cc: Kai Huang , isaku.yamahata@intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Paolo Bonzini , Jim Mattson , erdemaktas@google.com, Connor Kuehl Subject: Re: [RFC PATCH v5 038/104] KVM: x86/mmu: Allow per-VM override of the TDP max page level Message-ID: References: <5cc4b1c90d929b7f4f9829a42c0b63b52af0c1ed.1646422845.git.isaku.yamahata@intel.com> <20220401202847.GA560021@private.email.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220401202847.GA560021@private.email.ne.jp> X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 01, 2022, Isaku Yamahata wrote: > On Fri, Apr 01, 2022 at 02:08:38PM +0000, > Sean Christopherson wrote: > > > On Fri, Apr 01, 2022, Kai Huang wrote: > > > On Fri, 2022-03-04 at 11:48 -0800, isaku.yamahata@intel.com wrote: > > > > From: Sean Christopherson > > > > > > > > In the existing x86 KVM MMU code, there is already max_level member in > > > > struct kvm_page_fault with KVM_MAX_HUGEPAGE_LEVEL initial value. The KVM > > > > page fault handler denies page size larger than max_level. > > > > > > > > Add per-VM member to indicate the allowed maximum page size with > > > > KVM_MAX_HUGEPAGE_LEVEL as default value and initialize max_level in struct > > > > kvm_page_fault with it. > > > > > > > > For the guest TD, the set per-VM value for allows maximum page size to 4K > > > > page size. Then only allowed page size is 4K. It means large page is > > > > disabled. > > > > > > Do not support large page for TD is the reason that you want this change, but > > > not the result. Please refine a little bit. > > > > Not supporting huge pages was fine for the PoC, but I'd prefer not to merge TDX > > without support for huge pages. Has any work been put into enabling huge pages? > > If so, what's the technical blocker? If not... > > I wanted to get feedback on the approach (always set SPTE to REMOVED_SPTE, > callback, set the SPTE to the final value instead of relying atomic update SPTE) > before going further for large page. Pretty please with a cherry on top, send an email calling out which areas and patches you'd like "immediate" feedback on. Putting that information in the cover letter would have been extremely helpful. I realize it's hard to balance providing context for folks who don't know TDX with "instructions" for reviewers, but one of the most helpful things you can do for reviewers is to make it explicitly clear what _your_ expectations and wants are, _why_ you posted the series. Usually that information is implied, i.e. you want your patches merged, but that's obviously not the case here.