Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp192395pxt; Thu, 5 Aug 2021 22:50:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyP6i79HG5zJXavTf/FRFHCCT4sqhK4vZda6lM8bGa24hk5lhVNOMWnhElyqa3ZGe7Jsev6 X-Received: by 2002:a6b:6609:: with SMTP id a9mr16217ioc.8.1628229036092; Thu, 05 Aug 2021 22:50:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628229036; cv=none; d=google.com; s=arc-20160816; b=TjPOe6noYM17b1m3eMxcNFABL9JYiHcgMi5DW9R9ee1Y+Ly0AsFHOpr02fd9LBZ93G V/cxTDfcmaIFUcydBKL2okoblavSVTEIRKTuI+0O16mv9mVk2Z/Eunp+j5ypkLYwCxHR pHhLqR8fsU/rqzRlB+vJWPCjVxefLIyDVTVpyg03AUkggRJs5fG3N08ChWlCDLu5YIYY fOy0MDWh1Bb5iH9cpJHv4ijNp1r9Mf2b4PDCIHnT4LA6DloNIBDnIbH0P+bvJIzSGID8 4NRj0frcuL4SjuDZ7AyBkooOw6kgkNplcBnssD7vP3W0l2zsGrysQ4joSW2/nuttVeqt mLCg== 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=4BfhlnmFVBH/5WZ+qdtlmbrJsorAcYIvFXwLK0XohYE=; b=CN2QLCy2jB5+irs9OyFgUkVAXdi8+ieDr0q7ZfPM7FpIsBJT1Th8b+hDrZu9oels6t YcSWPT0ruHipxlNUxBY8oyYMf1tw3JvbvOETNzW/phwdwCHKRK9nj6dSJqK9n3bUlGhy z/NULTGl3atYR6qqFhVR3pUDLfU4DI8UhsDGTOhu2n8PCnnGYifh9DndPHpQxQcWBOAb NrjhZ/cKbFIUu+glBgmF1zKpDSVIZYJouuPVzstZJwYY9YqHh2gGSoxeN/OLZrRDE5/d kB//Pv/nAAV8X+pIYlZZ+L/xGSzlKm+Ps7EG2WTxO//vy8IZJH4X7EY1Us75nl4bhvBy VakQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=dv98SU3d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k2si7531671iol.39.2021.08.05.22.50.24; Thu, 05 Aug 2021 22:50:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=dv98SU3d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241614AbhHEWpU (ORCPT + 99 others); Thu, 5 Aug 2021 18:45:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241416AbhHEWpS (ORCPT ); Thu, 5 Aug 2021 18:45:18 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE8C4C061798 for ; Thu, 5 Aug 2021 15:45:03 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id dw2-20020a17090b0942b0290177cb475142so18540748pjb.2 for ; Thu, 05 Aug 2021 15:45:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=4BfhlnmFVBH/5WZ+qdtlmbrJsorAcYIvFXwLK0XohYE=; b=dv98SU3dX8RvvgAVciCvnnGdC9GdQBT286CvsF4rU/Akmb+g2mgUeL6+xZTH19oea+ PnZBh41abYDMAqjnI9FTwv3orGtpr5ZlF6Oz4r/RkL+jkAalhQf8XE20g/a3UJUf4gLY hfyzyBdWheKYTHb9xX/jYAyv8xfKYxfl9z7yQuPHFBtm5In6vHlXrcgEGy/lFJxQq9VB oDspbK92DQPxh4tua6tBF6eu5oPbIZep2J9Nr2QYPTmTXwQ6vUFd+VzQb2c71QQYU3PU A30umMTNbWF3Fbp/2BRmhGpW/vzx9JMFjtQGysO9xL0mM6utCdWnsnhuiEOw1OjNOYjw HbIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=4BfhlnmFVBH/5WZ+qdtlmbrJsorAcYIvFXwLK0XohYE=; b=YGPu2Cn666+PA4ifWjjtCQvjnHv3HZwYgDFYgTx0FLGJiT9k0oGWDC5M1woxUtvhq3 cLB2Cm9Q51CJUscAFYONzDK5JSmPGAkP0Smp09pd9zpkEhVXWFSeEjRUK2baUvDjbPF1 IKFPiTbQHA4UYrJzeuSYXZUTsHPwYH1gmTs11rG1ZBSlqFdB9zux6jpVAmk62KRBNy+0 z9JWgyKmMEavF2c7gHUAXBr7ATUuqbcjnZJQKYsCUdGIs1wK4dqKyv3ii5VaOIEqBDEw X0+ZzU/W2o42Yz+WRR7AdGik2GljrLWGouP99X2C/F+xmeDAUCIK0MeaQrzb54zhTR06 Gqzg== X-Gm-Message-State: AOAM5317qJHQK+MlBv1cyPlDnDWHzyFv08CiKsFQcNHW8kzWiaqM5wfi hp4dhIh+PgqJd2mVpjioOWWjWLzKuqQMVA== X-Received: by 2002:a17:902:bf01:b029:12c:d762:96c with SMTP id bi1-20020a170902bf01b029012cd762096cmr5872304plb.15.1628203503162; Thu, 05 Aug 2021 15:45:03 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id d2sm9146309pgv.87.2021.08.05.15.45.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Aug 2021 15:45:02 -0700 (PDT) Date: Thu, 5 Aug 2021 22:44:58 +0000 From: Sean Christopherson To: Jim Mattson Cc: Wei Huang , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, pbonzini@redhat.com, vkuznets@redhat.com, wanpengli@tencent.com, joro@8bytes.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com Subject: Re: [PATCH v1 1/3] KVM: x86: Convert TDP level calculation to vendor's specific code Message-ID: References: <20210805205504.2647362-1-wei.huang2@amd.com> <20210805205504.2647362-2-wei.huang2@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 05, 2021, Jim Mattson wrote: > On Thu, Aug 5, 2021 at 1:55 PM Wei Huang wrote: > > > > This design assumes that all x86 CPUs have the flexibility of changing the > > nested page table level different from host CPU. > > I can't even parse this sentence. What are you trying to say here? NPT inherits the host's CR4, and thus CR4.LA57. So KVM NPT is stuck using whatever N-level paging the host kernel is using.