From patchwork Thu Jun 15 21:50:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Sakkinen X-Patchwork-Id: 9790319 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DA8E060384 for ; Thu, 15 Jun 2017 21:51:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CCF7F28488 for ; Thu, 15 Jun 2017 21:51:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C1DDC284BB; Thu, 15 Jun 2017 21:51:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6E0DD28488 for ; Thu, 15 Jun 2017 21:51:00 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 5BE9421CA3584; Thu, 15 Jun 2017 14:50:13 -0700 (PDT) X-Original-To: intel-sgx-kernel-dev@lists.01.org Delivered-To: intel-sgx-kernel-dev@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D3D3921967BCC for ; Thu, 15 Jun 2017 14:50:11 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jun 2017 14:50:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.39,345,1493708400"; d="scan'208"; a="1141718190" Received: from mbroas-mobl.ger.corp.intel.com (HELO localhost) ([10.249.35.162]) by orsmga001.jf.intel.com with ESMTP; 15 Jun 2017 14:50:55 -0700 From: Jarkko Sakkinen To: intel-sgx-kernel-dev@lists.01.org Date: Thu, 15 Jun 2017 23:50:51 +0200 Message-Id: <20170615215051.3256-1-jarkko.sakkinen@linux.intel.com> X-Mailer: git-send-email 2.11.0 Subject: [intel-sgx-kernel-dev] [PATCH v2] intel_sgx: updated documentation about on virtualization X-BeenThere: intel-sgx-kernel-dev@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Project: Intel® Software Guard Extensions for Linux*: https://01.org/intel-software-guard-extensions" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kai.huang@intel.com MIME-Version: 1.0 Errors-To: intel-sgx-kernel-dev-bounces@lists.01.org Sender: "intel-sgx-kernel-dev" X-Virus-Scanned: ClamAV using ClamSMTP Updated documentation to document the constraint, which prevents emulating the MSR values for VM guests. Signed-off-by: Jarkko Sakkinen --- v2: fix typos Documentation/x86/intel_sgx.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/x86/intel_sgx.rst b/Documentation/x86/intel_sgx.rst index ee1db2ca2e39..71026732af61 100644 --- a/Documentation/x86/intel_sgx.rst +++ b/Documentation/x86/intel_sgx.rst @@ -77,6 +77,22 @@ every time when an enclave is launched. This does not scale because for generic case because BIOS might lock down the MSRs before handover to the OS. +Virtualization +-------------- + +The values for IA32_SGXLEPUBKEYHASHn MSRs cannot be emulated for a virtual +machine guest. It would easily seem feasible to hold virtual values for these +MSRs, trap EINIT and use the host LE to generate a token when a guest LE is +initialized. + +However, looking at the pseudo code of ENCLS(EINIT) from the SDM there is +a constraint that the instruction will fail if ATTRIBUTES.EINITTOKENKEY is +set (the documentation does not tell the reason why the constraint exists +but it exists). + +Thus, only when the MSRs are left unlocked before handover to the OS the +setting of these MSRs can be supported for VM guests. + Debug enclaves --------------