Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7316181ybi; Wed, 5 Jun 2019 15:22:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxotFW5MKGiKeO4WKFKBgQZfRuvcrnJgpk2+OxTY2euTAyQYYAbRud/xYO0WD744nOBFPat X-Received: by 2002:a17:90a:a608:: with SMTP id c8mr45840173pjq.37.1559773322359; Wed, 05 Jun 2019 15:22:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559773322; cv=none; d=google.com; s=arc-20160816; b=QKJ0PIwnsXsGYpu4JaDTZHj9OxvuvVCPKQRzEZ0lHmHDscTCDTPk5Q/O9D0iIx09ks oQ2Bi0aZ1fCr5Ek/XJEJWFli9xcpDJV0CFRbDnKBvu/jIHYRhHUfHphXSxcmRsYpuOU8 oL4z3hwaG/pB8+do18HsguYxJ/tFB7OUlifeeLd+UN5+/OK2jakQIFzw47WyCd5vf4cQ VKxbj41i9ksJc0GYSusX/Ky0MGNvVPYiMmDDY1jVcIlKJ/SoYbPY/C3gQtLBg7ed3rli 81l+uKXgEzkUT/TXAoyMGY0Iv6O6e3hl/nQTK/Y2N8S7Bn0uf+py+GZH4m6G8OecVVQL JrIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=a3e0O7jXiAp7rt3uopWjwSZvYmcopKNHS7RvetFCvO8=; b=oCSHdUrkBRwjwMyQqz6JkFFTq0LWkliR7y+fa33ghRzgiwr3yc5V+MS8z7jv6jU6Qf +IsWK4hrRNPZnMD8JG1N4MNE4I1XQCcooKI14mq+c9iYkH28W5rggyD8L2cX/6uBFd6W BTo6f+aFazVHfqRMKVWWBw5NALJDSFYo65FbEtdlUqFXCYeYG7g5Vl8fqH+ztb0MNUMb JeJizirBnzBpc6lQBdEFQQiTOAaC2yTLVE/FlraBO73xUe2d3PbKB3kbiI/oWaPLJ4Fy 3NTEQFJPHqNLdLzaVJuZNJ760nc8Da9kmfmAzCKnC2RlrUISAFD2AnyKtXAm3ulBLLg9 sNOg== 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 o1si60002pjb.8.2019.06.05.15.21.43; Wed, 05 Jun 2019 15:22:02 -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 S1726608AbfFEWUa (ORCPT + 99 others); Wed, 5 Jun 2019 18:20:30 -0400 Received: from mga07.intel.com ([134.134.136.100]:54982 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726510AbfFEWU3 (ORCPT ); Wed, 5 Jun 2019 18:20:29 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jun 2019 15:20:29 -0700 X-ExtLoop1: 1 Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.36]) by fmsmga006.fm.intel.com with ESMTP; 05 Jun 2019 15:20:28 -0700 Date: Wed, 5 Jun 2019 15:20:28 -0700 From: Sean Christopherson To: "Dr. Greg" Cc: Jarkko Sakkinen , Jethro Beekman , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "linux-sgx@vger.kernel.org" , "akpm@linux-foundation.org" , "dave.hansen@intel.com" , "nhorman@redhat.com" , "npmccallum@redhat.com" , "serge.ayoun@intel.com" , "shay.katz-zamir@intel.com" , "haitao.huang@intel.com" , "andriy.shevchenko@linux.intel.com" , "tglx@linutronix.de" , "kai.svahn@intel.com" , "bp@alien8.de" , "josh@joshtriplett.org" , "luto@kernel.org" , "kai.huang@intel.com" , "rientjes@google.com" Subject: Re: [PATCH v20 15/28] x86/sgx: Add the Linux SGX Enclave Driver Message-ID: <20190605222028.GH26328@linux.intel.com> References: <20190417103938.7762-1-jarkko.sakkinen@linux.intel.com> <20190417103938.7762-16-jarkko.sakkinen@linux.intel.com> <20190422215831.GL1236@linux.intel.com> <6dd981a7-0e38-1273-45c1-b2c0d8bf6fed@fortanix.com> <20190424002653.GB14422@linux.intel.com> <20190604201232.GA7775@linux.intel.com> <20190605142908.GD11331@linux.intel.com> <20190605145219.GC26328@linux.intel.com> <20190605212536.GA22510@wind.enjellic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190605212536.GA22510@wind.enjellic.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 05, 2019 at 04:25:37PM -0500, Dr. Greg wrote: > On Wed, Jun 05, 2019 at 07:52:19AM -0700, Sean Christopherson wrote: > > Good afternoon to everyone. > > > At this point I don't see the access control stuff impacting the LKM > > decision. > > > > Irrespetive of the access control thing, there are (at least) two issues > > with using ACPI to probe the driver: > > > > - ACPI probing breaks if there are multiple device, i.e. when KVM adds > > a raw EPC device. We could do something like probe the driver via > > ACPI but manually load the raw EPC device from core SGX code, but IMO > > taking that approach should be a concious decision. > > If that is the case, I assume that ACPI probing will also be > problematic for kernels that will be running on systems that have the > SGX accelerator cards that Intel has announced in them. Just to make sure we're all on the same page, by "multiple devices" I was referring to multiple char devices in the kernel, not multiple EPC "devices". > We haven't seen a solid technical description regarding how SGX > functionality is to be surfaced via these cards. However, since the > SDM/SGX specification indicates that multiple PRM/EPC's are supported, > the logical assumption would be that each card would be surfaced as a > separate EPC's. I haven't seen the details for the cards, but for multi-socket systems with multiple EPC sections, the ACPI tables will enumerate a single EPC "device" without any size or location information. I.e. ACPI can be used to detect that the system has EPC, but software will need to use CPUID to enumerate the number of sections and their size/location.