Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3435690iog; Mon, 27 Jun 2022 16:21:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1seDt7iK3AEiUeOPSLHjAsxMB+qft2fEyakV05gCfFkimUQkhTzXhhKtSKPnP86ru9qcBrn X-Received: by 2002:a17:906:2087:b0:716:ddcd:d124 with SMTP id 7-20020a170906208700b00716ddcdd124mr15268672ejq.488.1656372070871; Mon, 27 Jun 2022 16:21:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656372070; cv=none; d=google.com; s=arc-20160816; b=GXBaKo2p5//+LiMkGOv8GKcNgcj03GBZx+VFSMhLgULryThGrL361jRd+q05Hguwr/ B0x7QAUPQ3YFRa5fpa0vtDHD6V+tgbvQ9JGOijuwnr9YoDGCXrYsp3GvAumP6ePmC9Rj S1gOONl5rlLxx+5zX60r8kgBdvjPZOijDWfEeAnQEVkGR61DKxRCdB77cH7+mYr/0rxk ye+dS6+9vWzEVlomGyYZK7wmOrLDhpDju9Ji41rWHx8CPp2nnmLmb8t36RtZ7+bnImS6 9ov68qM3SAsZdDOshKtufncC0tPexkEbIDk4Qbo8QTfBO26ixU5MeNogkUURGP2ZMB5x IqJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=6N/uscbKe4aJkeawLNVpGUEooFBC1CQdDdSaiEFrhmI=; b=urhPKVpNHE8qQiDb1MVNguGK0vWiRJMifGtsSOzdbuEq4ybk3FykLihQlt6ssgn+4I vuuJQgIVpmPbphsTCz47V1ruC3LKHOwR6lET/m/yyHW3w4aJl/b9Fxpe2GHvR85Od/GO 3q7FNcuuRNRi78iIo3xT5rmHv9ZsC5YA9E4yGyAfq0hOXIBCEl1ml5Tc/eh0JwUsizt7 ZRHSImbKqf31ovwn7OOS0uUSQ9OekYzTamwZoJX1iz9vUx5mVI68SCUnK0fJXJjhUsHR mvyX197dgfIe+ZAD/TlYgrCgLD3QkCzT9nfxRONWWZuwt8HZ7PHcf3tn5si1XZE4edYf z6lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gjQee9Du; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb8-20020a170907960800b00726348d8907si11404258ejc.493.2022.06.27.16.20.45; Mon, 27 Jun 2022 16:21:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gjQee9Du; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242797AbiF0W6J (ORCPT + 99 others); Mon, 27 Jun 2022 18:58:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241880AbiF0W6I (ORCPT ); Mon, 27 Jun 2022 18:58:08 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8726A10C; Mon, 27 Jun 2022 15:58:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656370687; x=1687906687; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=zVmwtCQNF6fzOVCPckEQuUt0SlS/3Ly8rekwR8DjUy4=; b=gjQee9DuVZRDzrXgSfciibX16tkM1lEU8bJYoRxU1OvwYeUgu7a2oUuK zmv8Pa+6mokamj/Zofq698nLSSVTqEqinvs4gHIGKK6D1g3oZRnG1p7/q G+zQSqsChyc2SuhkVLlRuiXwzWuo4l6hTjfbM4ZX8vidRpmwEXn6MEpDG ZOocKNpqPggZ5iddJKb5/MwI85FEqy4SJx7uBCHfU5IUuFTt+SL4ZWxel 8OnuPSa13MgLBz2DdlGOw9JViwTGx+Ukic6vXvssEXOpyOVxMMMhXS/1O qZFlMNgNXdKjbNXod3eLpkY3izdN/yMb+dlZcfLv40CEiB91USJqqa3Pu g==; X-IronPort-AV: E=McAfee;i="6400,9594,10391"; a="282672819" X-IronPort-AV: E=Sophos;i="5.92,227,1650956400"; d="scan'208";a="282672819" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2022 15:58:07 -0700 X-IronPort-AV: E=Sophos;i="5.92,227,1650956400"; d="scan'208";a="732509814" Received: from jsagoe-mobl1.amr.corp.intel.com (HELO [10.209.12.66]) ([10.209.12.66]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2022 15:58:06 -0700 Message-ID: <3253e9fa-14f8-085e-5f13-bb70fea89abf@intel.com> Date: Mon, 27 Jun 2022 15:57:07 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v5 15/22] x86/virt/tdx: Allocate and set up PAMTs for TDMRs Content-Language: en-US To: Kai Huang , linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: seanjc@google.com, pbonzini@redhat.com, len.brown@intel.com, tony.luck@intel.com, rafael.j.wysocki@intel.com, reinette.chatre@intel.com, dan.j.williams@intel.com, peterz@infradead.org, ak@linux.intel.com, kirill.shutemov@linux.intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, isaku.yamahata@intel.com References: From: Dave Hansen In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 6/27/22 15:50, Kai Huang wrote: >> Are Kirill's magic 0/1/2 numbers the same as >> >> TDX_PG_4K, >> TDX_PG_2M, >> TDX_PG_1G, >> >> ? > Yes they are the same. Kirill uses 0/1/2 as input of TDX_ACCEPT_PAGE TDCALL. > Here I only need them to distinguish different page sizes. > > Do you mean we should put TDX_PG_4K/2M/1G definition to asm/tdx.h, and > try_accept_one() should use them instead of magic 0/1/2? I honestly don't care how you do it as long as the magic numbers go away (within reason).