Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp809745imu; Wed, 9 Jan 2019 06:48:40 -0800 (PST) X-Google-Smtp-Source: ALg8bN51Fjcqh7tx6xbK9s7jJTYFzkqbSE1wV7QtavHoE9qLheAE6ZI6g5llfPDb3ZysK5KglOqn X-Received: by 2002:a17:902:a58a:: with SMTP id az10mr6450841plb.10.1547045320271; Wed, 09 Jan 2019 06:48:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547045320; cv=none; d=google.com; s=arc-20160816; b=ORg4dsuy0vEQ5I9US5ljvYFdUtwHfYEAx5hBNxpxY2NsIWPv515gMLFWvRRizyVbC8 Nwk3WsJneRDEeTbhaWG58lBMOOuKjBThKK5Zh9c7TK9p2piEKSlZftVvVv9cGBC/zHjf XlEcd1bwwqWblq+8j7twMBWMDOSqNxzLz+C8e7z7NEYXev5XTxyVZX1nWnluHc34rLDH FbPAfAJpW1Hdc0zy3HV2g1yps6L7BHC6kSixCsd2n5QtzF+7fUCpaZ4jG4/WrIBDcHaK cf0309YjVhU0+M3R2uSMkZ8bNA5TuCTaSpW/SnNrtFNWZrgbavSEyYbEL2buyJDVOYMV T2kQ== 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; bh=VunovGrNtGt9+YqKGB7J0B7Yzd7awj7RZRrymc55KJ8=; b=wz7RlOSBexz+dnxx1YqqH51f/Bl31M5ViewlnconM0F0WbxwXrxr9QBe2BBtd5QsmM RjjAl4jtJQCkSfnw50fLznIgVWo1QutK0CBE2UxHg6CRxhs+Q4eaXBHB2m/UjuOUhkVB kKh8OIbSrXbUcTp7LSdYnnOo9P0fwct2F99MN2lVnsgtAXXO/60WRP2EGsyrJK6QJMTW uFKlYzEtnxywQNFaenSoo/YCFkRqMDmKMrgLm9e6xBHnx4JNrugDCXFfVl/JzMkCxWLH puJFDEq9v3gTcz42kOPdbKARPG36wyk3JEG6yYOQDK10lahKroLvFj9jzIbrWVIAQOK8 MTsQ== 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 k18si3953044pfd.241.2019.01.09.06.48.24; Wed, 09 Jan 2019 06:48:40 -0800 (PST) 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 S1731872AbfAIOpa (ORCPT + 99 others); Wed, 9 Jan 2019 09:45:30 -0500 Received: from mga09.intel.com ([134.134.136.24]:38699 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731753AbfAIOpa (ORCPT ); Wed, 9 Jan 2019 09:45:30 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jan 2019 06:45:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,457,1539673200"; d="scan'208";a="115420021" Received: from jsakkine-mobl1.tm.intel.com (HELO localhost) ([10.237.50.93]) by fmsmga008.fm.intel.com with ESMTP; 09 Jan 2019 06:45:25 -0800 Date: Wed, 9 Jan 2019 16:45:25 +0200 From: Jarkko Sakkinen To: Sean Christopherson Cc: Andy Lutomirski , Jethro Beekman , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "x86@kernel.org" , Dave Hansen , Peter Zijlstra , "H. Peter Anvin" , "linux-kernel@vger.kernel.org" , "linux-sgx@vger.kernel.org" , Josh Triplett , Haitao Huang , "Dr . Greg Wettstein" Subject: Re: x86/sgx: uapi change proposal Message-ID: <20190109144524.GA8367@linux.intel.com> References: <20181219091148.GA5121@linux.intel.com> <613c6814-4e71-38e5-444a-545f0e286df8@fortanix.com> <20181219144515.GA30909@linux.intel.com> <20181220103204.GB26410@linux.intel.com> <20181222081649.GB8895@linux.intel.com> <20181222082502.GA13275@linux.intel.com> <20190102204752.GG7460@linux.intel.com> <20190103150256.GA17015@linux.intel.com> <20190103162634.GA8610@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190103162634.GA8610@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 03, 2019 at 08:26:35AM -0800, Sean Christopherson wrote: > What I was trying to explain is that the uapi isn't for KVM, it's for > the userspace hypervisor, e.g. Qemu. Qemu will inform KVM of the > resulting guest memory region so that KVM can configure its guest page > tables accordingly, but that is done through KVM's existing memory uapi. OK, I now I got it, apologies it took such a long time :-) Now I see the analogy e.g. qemu creates independently VMAs and then fuels those regions to KVM. Similarly qemu would create regions for KVM using "/dev/sgx/mem". For me this is perfectly fine now I understand the reasoning and neither does make my job more difficult to implement the file based enclave change. Thanks for the patience with this... /Jarkko