Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp424781imm; Fri, 31 Aug 2018 04:15:43 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZuJvyfoSosbdrcKMhEDUWE8ff1pMcC0VnT1T7iQut7flJDnKCLu4eurEKSkVW0aPTA94qg X-Received: by 2002:a17:902:7798:: with SMTP id o24-v6mr14908810pll.93.1535714142979; Fri, 31 Aug 2018 04:15:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535714142; cv=none; d=google.com; s=arc-20160816; b=C+PmeF4BolFnXgnFaG7WhrFLXwH9DfNaWO6ftlCzHsRBjnW/ZItSLmGzytnbjZF3PE L+ZM/eCg4xRAbGndbpCBLUS5nR6OYDBA1VwQ6Cs8oF9uDQuvWU+z/4uVnoY5SpPNUEmT 3zvyw0/fPNa9O2UiaZmWRFl+hNbYdcfaRFa7VNLjZOJTrVyfYARIjn5k2tL4rgWSlv0f Azok/xOFYvtT1iikg9pbt0Rxrw1vYDphYwakWII1DtqT+LkVqLiI8WjIOD6a4cottqL2 EuonYob+tKA2fBEkViEVOlNxL+w025DqTfB6dwOzPf6lhKWBwNk91imKfHrOJqkNfjNn aB8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=5d/tZsoYXl2+QH8ViCav3alhmzl/cUSiTmAv84u5IME=; b=aaAgVjtAXal8d4HJqydSnO+WhwbTVaR5FPkczpcQs2ZErAfMV8pd45NDf5MbbIV/Sf mGE0q+A3N0m9KG3vHrCoGV3rgnYvJRvMATBsJ9BZhP9HDjyQfWILWXzvDYMYqB6oAU97 PCxVhLq0b/lgj9q96agOragcL8EIYHoyjdxeYiYPfLoYxQtGkNTpE7wTrUhNnOTMFLYa E6A2uGk1yfbpZNQ/6ymty2hEqaGxEbB4R9d4t+5gcoQWIwL0eSwrv2XVer9LCxzNIQjw oKgSpdzli0TkJjoyfVNo/bcJr95Q30vhm+09n+j1Vz+qVtX/IKu08katOvDH9ubxXAMU 33cg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y9-v6si9356450pgi.691.2018.08.31.04.15.27; Fri, 31 Aug 2018 04:15:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727946AbeHaPRm (ORCPT + 99 others); Fri, 31 Aug 2018 11:17:42 -0400 Received: from mga09.intel.com ([134.134.136.24]:16718 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726990AbeHaPRm (ORCPT ); Fri, 31 Aug 2018 11:17:42 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Aug 2018 04:10:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,311,1531810800"; d="scan'208";a="84964149" Received: from ssirohi-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.48.112]) by fmsmga004.fm.intel.com with ESMTP; 31 Aug 2018 04:10:39 -0700 Date: Fri, 31 Aug 2018 14:10:38 +0300 From: Jarkko Sakkinen To: Dave Hansen Cc: x86@kernel.org, platform-driver-x86@vger.kernel.org, sean.j.christopherson@intel.com, nhorman@redhat.com, npmccallum@redhat.com, linux-sgx@vger.kernel.org, Serge Ayoun , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Suresh Siddha , "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" Subject: Re: [PATCH v13 07/13] x86/sgx: Add data structures for tracking the EPC pages Message-ID: <20180831111038.GA16827@linux.intel.com> References: <20180827185507.17087-1-jarkko.sakkinen@linux.intel.com> <20180827185507.17087-8-jarkko.sakkinen@linux.intel.com> <4666cae8-c711-8dd5-cbce-3d97cc19a9e5@intel.com> <20180828103040.GA21326@linux.intel.com> <68d730bc-898c-973f-9506-648fd8a7c610@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <68d730bc-898c-973f-9506-648fd8a7c610@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 28, 2018 at 09:53:11AM -0700, Dave Hansen wrote: > >>> extern bool sgx_enabled; > >>> extern bool sgx_lc_enabled; > >>> +extern struct sgx_epc_bank sgx_epc_banks[SGX_MAX_EPC_BANKS]; > >>> + > >>> +/* > >>> + * enum sgx_epc_page_desc - defines bits and masks for an EPC page's desc > >> > >> Why are you bothering packing these bits? This seems a rather > >> convoluted way to store two integers. > > > > To keep struct sgx_epc_page 64 bytes. > > It's a list_head and a ulong now. That doesn't add up to 64. Ah, there used to be one more variable in it. > If you properly describe the bounds and limits of banks we can possibly > help you find a nice solution. As it stands, they are totally opaque > and we have no idea what is going on. Great, I see what I can do. I understand now better what you are looking for. Thanks Dave. /Jarkko