Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1454237pxy; Mon, 2 Aug 2021 01:52:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxavskn3YHN2ZuKVl07T85rBCCRJeY+grI1Zaz83h2BAysX2TlqAnYuUZnGzsB7uMuO2rYI X-Received: by 2002:a5d:9808:: with SMTP id a8mr6038576iol.1.1627894328363; Mon, 02 Aug 2021 01:52:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627894328; cv=none; d=google.com; s=arc-20160816; b=ivC0RW8ZMtB3AFswbjBbtD8K5+wUww4dQCh0BrYyzxdQAPPKw9wxyKdXVbVzHHyYhy 1zHbFoSs6hoTIhcjHbT0kCYUhHom6+5KL3SRMADpx3ScAp99zXbgWA+xfM5fb5UT0fYl DAsDvyJsPB7S0Uf+FoQzU6JPYEtb0Q6ZvqsmVkN6+C7PSvLsUTf7x3wDByxM4o6jQxt7 pJHA2p7o+Hgwu++W6U+HBz30SC2P41pULZsFHHFQAtZ6Eh5fckqoZqM6WH8n+CQgH1Fk t1AfOl72ya9hB53WyfU3CBHuuaYHAjaAfaPWg2ku5FHsKMb6ngqM0wcQ8oiKnL6bFF0t AV0A== 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=G/LsZsucHmgl1zBrKmEKE/fwLYG0ZMmIl4ux65R5YiY=; b=FFDWlez1pX4+xKmQwRJQY+W2Lw5xbX7DB45000z83W4H+MWVyQoH3F3hCEZ26wgYzR guPO59nW3xESIvxsP9KaD3Z14Tb/AWembJT4gIIvRi8npgyLVu78Uk9biDhfimhnBihV wUSqm+Yr38vK9V47eRZa2UorGBucA00UbKDvtJ+avIlMn65vS07Hr+moL334bpddnVr+ 1DdcbsYvIhbe5XlRppM1gIT/1ZMBxLGC51Jcwm90lVtukq5iXDn7mDYhlKjXDdcAwauN B5pr4iPHbD0wS8G26iH+dTfGjgRuwn5rVwUTs2CU+B14VHtfIXeDS3uT+/L/FlULsmPg xlZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="t/r+6hxw"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si11705715ilo.83.2021.08.02.01.51.57; Mon, 02 Aug 2021 01:52:08 -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=@kernel.org header.s=k20201202 header.b="t/r+6hxw"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232782AbhHBIvY (ORCPT + 99 others); Mon, 2 Aug 2021 04:51:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:50350 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232670AbhHBIvX (ORCPT ); Mon, 2 Aug 2021 04:51:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A10A7600D4; Mon, 2 Aug 2021 08:51:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627894274; bh=JkMPHRlRiWbcXYKwPv+E6sp/LJ9D9Stb3/dNTCbdr6Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=t/r+6hxwGSkiajYaL9VBF4WXnaAaGL6PV/cWHDUU8n+DVB0g+6tom3DuPa3KsuP9j LS4qu0pXpISAHWwnB4X8npGchkwNqDth7Ux0ggH0L320hh4Pqykisu5aeJx9E0QHg1 fdtpO3bLjOlVhLGWoVQeSKOxu//YtCgCXGigiLnErD8FmuGTWI2uP7omPwDZJSGuRG fzhQMpe4dUCqmRR31jLQhOMxqaoKkkLErAAHN/w9qiG/66jDJbTYk/zvEofM5ekqjD lmt0f+Z2va5jl77jj7fC7g0OujIpmlaPDdMJLjTaPDbdvfY+JUej+GEkG6XShWgPrE Ok/Fypsxi/OTw== Date: Mon, 2 Aug 2021 11:51:10 +0300 From: Jarkko Sakkinen To: Dave Hansen Cc: Sean Christopherson , Tony Luck , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/7] x86/sgx: Add infrastructure to identify SGX EPC pages Message-ID: <20210802085110.oo7qxjlccpv6rzcx@kernel.org> References: <20210719182009.1409895-1-tony.luck@intel.com> <20210728204653.1509010-1-tony.luck@intel.com> <20210728204653.1509010-3-tony.luck@intel.com> <141602a3-ef61-01f0-4a3c-69f8e7012fcd@intel.com> <20210730003809.hp3nmqmgyysa45nz@kernel.org> 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 Fri, Jul 30, 2021 at 09:50:59AM -0700, Dave Hansen wrote: > On 7/30/21 9:46 AM, Sean Christopherson wrote: > > Out of curiosity, on multi-socket systems, are EPC sections clustered in a single > > address range, or are they interleaved with regular RAM? If they're clustered, > > you could track the min/max across all sections to optimize the common case that > > an address isn't in any EPC section. > > They're interleaved on the systems that I've seen: > > Socket 0 - RAM > Socket 0 - EPC > Socket 1 - RAM > Socket 1 - EPC > > It would probably be pretty expensive in terms of the physical address > remapping resources to cluster them. If they were clustered, wouldn't that also break up our initialization code for NUMA? It's based on detecting of which NUMA nodes address range is the given EPC section. I.e. there should be some meta-data to draw the connection to the correct NUMA node, if they were clustered (which does not exist). /Jarkko