Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp447202imm; Fri, 31 Aug 2018 04:54:32 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaK7O5E6dP2n+ejHGodHRg9wqp2Vs7DiVvZAhh1HUBhV1q4oXO5vg+g3Uiu3cRfJMyRCQQ7 X-Received: by 2002:a65:6499:: with SMTP id e25-v6mr13505552pgv.224.1535716472840; Fri, 31 Aug 2018 04:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535716472; cv=none; d=google.com; s=arc-20160816; b=fCLAtWVS54JhfU9gW2CvHxH75PJCXhe7nqlcnibT9dPFKKBDAHV2P2YMv2u6hdYbkX DHKMcED0LkAcxLUqbhhUdHTwnTQD472rbKJjijYYGS6JttlrllD9E/v9ZswbYBmdresU byoYsxARdP4FEbGc0mwI5y+LbaSwN3FxHx3KONZidx7wXyVmW1ChxDAS5WTmvqY5TBKx +RbOvCM21mDE+ggagkwmbNreim7FxSt96WEOB1rrSBBA7JwG8aalacIilsVHP/t7wgZF pGevU5z791v6vLBVROH1Urik4GAZdSHYcagmNbmh8LQMt40GmprnX2DjglPv/hI5wLny P8aQ== 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=f5WgeYJzyc0T0nsgMQEwpuO9Ao23eAVwGDvP48/av+s=; b=JNNU/u1nSCU+f/rduIz4AUldeNclYDPLSZwmykKOSG++LXvihkRTqI5Ax+WAOnXxPh qB50YkkcwHPILy2PJ0Oequ6EFRPON0r1e5iI7eEAfxCBmABLBUS1n/qYL0rwRYz3sy3O 3vdWZRJszZLA22DZtsG53rPlUVEMkr4OLbUIX+eCdjlNIhc4hDdNDuZtiZzI5Sr/q+Mp VwWZjWKokhja78kPoQ0jJ0dNKaOVuQLNRQYqMR9GC1XOzrUtjsbviHEmyyc56RquNo88 uNaK/j9pviFroWUf1ErufE6smxAGPEV3Yh97sSWH9IYGYAmyJ7hvLc+u1Yqf08JM5L3P BK2w== 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 64-v6si9763980ply.375.2018.08.31.04.54.18; Fri, 31 Aug 2018 04:54:32 -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 S1727975AbeHaPUj (ORCPT + 99 others); Fri, 31 Aug 2018 11:20:39 -0400 Received: from mga05.intel.com ([192.55.52.43]:18597 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726990AbeHaPUj (ORCPT ); Fri, 31 Aug 2018 11:20:39 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Aug 2018 04:13:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,311,1531810800"; d="scan'208";a="84964652" 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:13:35 -0700 Date: Fri, 31 Aug 2018 14:13:34 +0300 From: Jarkko Sakkinen To: Sean Christopherson Cc: Dave Hansen , x86@kernel.org, platform-driver-x86@vger.kernel.org, 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: <20180831111334.GB16827@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> <20180828213432.GB29488@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180828213432.GB29488@linux.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 02:34:32PM -0700, Sean Christopherson wrote: > On Tue, Aug 28, 2018 at 09:53:11AM -0700, Dave Hansen wrote: > > >>> + sgx_nr_epc_banks++; > > >>> + } > > >>> + > > >>> + if (!sgx_nr_epc_banks) { > > >>> + pr_err("There are zero EPC banks.\n"); > > >>> + return -ENODEV; > > >>> + } > > >>> + > > >>> + return 0; > > >>> +} > > >> > > >> Does this support hot-addition of a bank? If not, why not? > > ... > > > I'm not aware that we would have an ACPI specification for SGX so this > > > is all I have at the moment (does not show any ACPI event for > > > hotplugging). > > > > So you're saying the one platform you looked at don't support hotplug. > > I was looking for a more broad statement about SGX. > > Hardware doesn't support hotplug of EPC as the EPC size and location > is locked during activation of SGX. And IIRC, activation of SGX must > be synchronized across all CPUs in a multi-socket platform, e.g. you > can't late-enable SGX on a socket and due hotplugging that way. Makes me wonder how on a multisocket platform would this work anyway given that they have different fused keys? > In a virtualized environment there are no such restrictions. I am not > aware of any explicit requirements or use cases for supporting hotplug > of EPC, but that's probably only because virtualization of SGX is > fairly nascent. /Jarkko