From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B00C4C433DB for ; Wed, 3 Feb 2021 23:12:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 61B8664F55 for ; Wed, 3 Feb 2021 23:12:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233329AbhBCXLl (ORCPT ); Wed, 3 Feb 2021 18:11:41 -0500 Received: from mga04.intel.com ([192.55.52.120]:38359 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233704AbhBCXKI (ORCPT ); Wed, 3 Feb 2021 18:10:08 -0500 IronPort-SDR: J+oKVYuBKMYdqkRVgHArdEIcM/2vhmAIdIiBjhCXir/joHpHJY6YvgHyA6ckvGO/sCUkEgVE+u Q/qntBE5XGVA== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="178573542" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="178573542" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 15:09:42 -0800 IronPort-SDR: jS1BfyMwvQAv/LMWd4e+ehU1gcsAlJxctbsJIKBRDze2O2+c7Ea9VBeknKvkSza2fK9f6TvbK/ 6/cVGKOfzY9g== X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="576070334" Received: from rvchebia-mobl.amr.corp.intel.com ([10.251.7.104]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 15:09:37 -0800 Message-ID: Subject: Re: [RFC PATCH v3 00/27] KVM SGX virtualization support From: Kai Huang To: Dave Hansen , Paolo Bonzini , Sean Christopherson Cc: "Edgecombe, Rick P" , "linux-sgx@vger.kernel.org" , "kvm@vger.kernel.org" , "x86@kernel.org" , "corbet@lwn.net" , "luto@kernel.org" , "jethro@fortanix.com" , "wanpengli@tencent.com" , "mingo@redhat.com" , "b.thiel@posteo.de" , "tglx@linutronix.de" , "jarkko@kernel.org" , "joro@8bytes.org" , "hpa@zytor.com" , "jmattson@google.com" , "vkuznets@redhat.com" , "bp@alien8.de" , "Huang, Haitao" Date: Thu, 04 Feb 2021 12:09:35 +1300 In-Reply-To: References: <4b4b9ed1d7756e8bccf548fc41d05c7dd8367b33.camel@intel.com> <99135352-8e10-fe81-f0dc-8d552d73e3d3@intel.com> <475c5f8b-efb7-629d-b8d2-2916ee150e4f@redhat.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3 (3.38.3-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-sgx@vger.kernel.org On Wed, 2021-02-03 at 09:46 -0800, Dave Hansen wrote: > On 2/3/21 9:43 AM, Paolo Bonzini wrote: > > On 03/02/21 18:36, Sean Christopherson wrote: > > > I'm not at all opposed to preventing KVM from accessing EPC, but I > > > really don't want to add a special check in KVM to avoid reading EPC. > > > KVM generally isn't aware of physical backings, and the relevant KVM > > > code is shared between all architectures. > > > > Yeah, special casing KVM is almost always the wrong thing to do. > > Anything that KVM can do, other subsystems will do as well. > > Agreed. Thwarting ioremap itself seems like the right way to go. This sounds irrelevant to KVM SGX, thus I won't include it to KVM SGX series.