Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36733642rwd; Tue, 11 Jul 2023 05:11:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlH7gLmbrpt8z07pLI1aAePMGZwZbUZoBqjFMLEuhSUC+2grBt7OMuXfqxdRkCrXRYEXlWnX X-Received: by 2002:aa7:c98a:0:b0:51e:3427:63ea with SMTP id c10-20020aa7c98a000000b0051e342763eamr12456647edt.8.1689077459786; Tue, 11 Jul 2023 05:10:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689077459; cv=none; d=google.com; s=arc-20160816; b=HwWVTVf9QmhnfuqUY64hEwzz/el39JzrJROaae2yIv/3/Lx+TQ5Q+yIA0VZIZrTppy +7sbxIs6y97RrRmkYhNqyKiUflKnP/tQbGHmMkt7At7AAqhw+mTXRpwLgP1+je5TNfpr nm/QljaTuO9NZr0YWHWmCmsiuT53Hsk2gFR2muPP/SNM5O6eYGXfiyr7d6W+JAR0z81r d3bJVud9pdgL9tH2AW0IZTGEHK0EuDaFiZfb/qzbw8BUKrU6R17XkWe5yER085/hsYkq Y6Xenb73OGWHQ4tebiYS3HTAXCS/jL10qx9nqi4jNg4W2MB+FCqd4CBsbbIsLa4TL/1o nPPg== 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 :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=9QndkvGX+ralMYrK4vSVmQjm+CR9QG8JZocEr1mbjrI=; fh=tr0RDG2UZSvqRZ69BjFL3x7Ri3/SiJgpBhNyimuZWZw=; b=xGP4HZrx2OSuCbv5AdTEbl9bQuKz+caJ1W2FkVshEmlOg5ed+ub8LQ8TTqoW7VuLOd lFt+VZ5rwQhPbo90si/F7R5r5CiRhDSa3R6QMCPEWVld1y9NjMYAxOJd3qIRFBb+Wfaw uC4+2svsm/8E1ui1WmUXJdn2J+Um/6aSxOgMUuUnEufoUqfjAr/O9mdmPWhREnQVXPkO Z5YyT6gNpbATcI3BK+tXqhkdRGVCGwVjZCC+Boaqr9FHqSv8SeyPH7m0U2rCPdMvbH7r HzHMIh+lgKIeyM6IBb13oM3ah/psAuIkuwsZj3g5Rny1LisLct47aUGKJ3fNncatcYzA BUfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="d/f4DSnV"; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q22-20020aa7da96000000b0051e1b797279si1892135eds.166.2023.07.11.05.10.16; Tue, 11 Jul 2023 05:10:59 -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=@redhat.com header.s=mimecast20190719 header.b="d/f4DSnV"; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231195AbjGKL4n (ORCPT + 99 others); Tue, 11 Jul 2023 07:56:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229961AbjGKL4m (ORCPT ); Tue, 11 Jul 2023 07:56:42 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D76F11D for ; Tue, 11 Jul 2023 04:55:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689076552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9QndkvGX+ralMYrK4vSVmQjm+CR9QG8JZocEr1mbjrI=; b=d/f4DSnVyPPUijWL5k+LweWOk505S9B9v/SzltEfAaILXdw5R44b/mNmi7YVoOv4qb6uzK QgufYT4vBOCDTTk+r05FQgIY40yNWU8NhAWbA4QoyYPkN+NKStSrbycT7ZLuRrbdt/R1aR JiWTBLd+VLmJBhv75gVXUKLHiA3vPDA= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-386-ElwcVVxyOSGilPdSdC8jsA-1; Tue, 11 Jul 2023 07:55:51 -0400 X-MC-Unique: ElwcVVxyOSGilPdSdC8jsA-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-3fbdd5d09b8so37860865e9.1 for ; Tue, 11 Jul 2023 04:55:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689076550; x=1691668550; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9QndkvGX+ralMYrK4vSVmQjm+CR9QG8JZocEr1mbjrI=; b=Jd99P2baQ7qNYvPk4Kv5jJXERQPYkbWSC1nAYMT1Xo3as8ysW9ClzNLIcmP2UbG1Xw 7Mt+38wSi0rfYcFUekXjiTwA3WOjAkl0Hu9iiN4QeqUNPjVb9jFh27NgFaoX/7yfn/DS YA4IXjf7CyD2aEHBoxMfQzFpt8G80LvwLAv/sFru3hyqr+q1TD6R0BcwNcUtSOIxr8p0 p8lQo93mSpwKkPpCcpbx0mygRaU/xXgBHT89PWgGIPipFF9Q6Irdbzme59sEHJds9w0D gXdymWtLdfKjbxpfem1L/DoFhE9/t+CXoMjNgPvv/rPTi+kxKrBTzReOB77COw47e02l 4z/w== X-Gm-Message-State: ABy/qLYDmBbzJswRgi+3lfyhVUbl+ZLK7ySNUETl3WO9zM8R9f99EIYB t2VMVJzB71u5KMhzqKXQEIpNqrrkjSjYgaaG3wvrvnxrd0q2hnglmZbGrOOsbo3c6Q3EhuWxYmL 9APt10L3nqRdmIFTXAZYDcUD8 X-Received: by 2002:a5d:4d0b:0:b0:313:e20c:b8e0 with SMTP id z11-20020a5d4d0b000000b00313e20cb8e0mr15606183wrt.23.1689076550481; Tue, 11 Jul 2023 04:55:50 -0700 (PDT) X-Received: by 2002:a5d:4d0b:0:b0:313:e20c:b8e0 with SMTP id z11-20020a5d4d0b000000b00313e20cb8e0mr15606169wrt.23.1689076550073; Tue, 11 Jul 2023 04:55:50 -0700 (PDT) Received: from ?IPV6:2003:cb:c745:4000:13ad:ed64:37e6:115d? (p200300cbc745400013aded6437e6115d.dip0.t-ipconnect.de. [2003:cb:c745:4000:13ad:ed64:37e6:115d]) by smtp.gmail.com with ESMTPSA id y11-20020a05600c364b00b003f90b9b2c31sm12817954wmq.28.2023.07.11.04.55.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Jul 2023 04:55:49 -0700 (PDT) Message-ID: <3abfb722-a0c1-dcad-55f9-dfff7167c501@redhat.com> Date: Tue, 11 Jul 2023 13:55:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v12 12/22] x86/virt/tdx: Allocate and set up PAMTs for TDMRs Content-Language: en-US To: "Huang, Kai" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Cc: "Raj, Ashok" , "Hansen, Dave" , "Luck, Tony" , "bagasdotme@gmail.com" , "ak@linux.intel.com" , "Wysocki, Rafael J" , "kirill.shutemov@linux.intel.com" , "Chatre, Reinette" , "Christopherson,, Sean" , "pbonzini@redhat.com" , "linux-mm@kvack.org" , "tglx@linutronix.de" , "Yamahata, Isaku" , "mingo@redhat.com" , "nik.borisov@suse.com" , "hpa@zytor.com" , "peterz@infradead.org" , "Shahar, Sagi" , "imammedo@redhat.com" , "bp@alien8.de" , "Gao, Chao" , "Brown, Len" , "sathyanarayanan.kuppuswamy@linux.intel.com" , "Huang, Ying" , "Williams, Dan J" , "x86@kernel.org" References: <85ea233226ec7a05e8c5627a499e97ea4cbd6950.1687784645.git.kai.huang@intel.com> <68a8cba5-55b6-4c8a-f4e6-d528fc839285@redhat.com> <4fe54e141ec5040300d0e2552ea31b83aa947ec2.camel@intel.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <4fe54e141ec5040300d0e2552ea31b83aa947ec2.camel@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 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_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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 11.07.23 13:49, Huang, Kai wrote: > On Tue, 2023-07-11 at 13:42 +0200, David Hildenbrand wrote: >>> - ret = add_tdx_memblock(tmb_list, start_pfn, end_pfn); >>> + ret = add_tdx_memblock(tmb_list, start_pfn, end_pfn, nid); >>>     if (ret) >>>     goto err; >> >> Why did you decide to defer remembering the nid as well? I'd just move >> that part to the patch that adds add_tdx_memblock(). > > Thanks for the review. > > The @nid is used to try to allocate the PAMT from local node. It only gets used > in this patch. Originally (in v7) I had it in patch 09 but Dave suggested to > move to this patch (see the first comment in below link): > > https://lore.kernel.org/lkml/8e6803f5-bec6-843d-f3c4-75006ffd0d2f@intel.com/ Okay, thanks. -- Cheers, David / dhildenb