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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 586A4C43334 for ; Fri, 22 Jul 2022 15:21:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235700AbiGVPVx (ORCPT ); Fri, 22 Jul 2022 11:21:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235096AbiGVPVv (ORCPT ); Fri, 22 Jul 2022 11:21:51 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B4D3951EC; Fri, 22 Jul 2022 08:21:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658503310; x=1690039310; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=aDJUMyeqWgGKDiSGRd02hg78VKlOMsWC6o9pMReTRlc=; b=kfZUyhMC3FM65hDiDrmDux2jkWwMx6JUoQodZnFzPtk5FnX+avWA3h3i OkquEr0gdCpMwu2GdqLcgc20r/FNxt+cVMUIf25PtO8VcdBZhzhqXJaWt 39iXHm6iSNsixjBOT9q2uV4Ba8spp6lEJm8Zo2v0yaXotus03esGPD3Gr qEk3d2/P61xPPXfIHTKi86qZS+ZANHTYo5X8neTk9//R689BwJ4ELgPKz NnF0iNiG0SvMA/23Jp9R7jhCR1m6M0oiIjqtNOzW0CwshZ2AiontdFi0g 7vTNgdpkHe6niBlOlT9acgyMBqirxXSBNBqf4sgnQvm0EhMUb6YolsnpN w==; X-IronPort-AV: E=McAfee;i="6400,9594,10416"; a="288504864" X-IronPort-AV: E=Sophos;i="5.93,186,1654585200"; d="scan'208";a="288504864" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jul 2022 08:21:49 -0700 X-IronPort-AV: E=Sophos;i="5.93,186,1654585200"; d="scan'208";a="926078552" Received: from jnoah-mobl.amr.corp.intel.com (HELO [10.209.71.211]) ([10.209.71.211]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jul 2022 08:21:47 -0700 Message-ID: Date: Fri, 22 Jul 2022 08:21:46 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH] [v2] x86/sgx: Allow enclaves to use Asynchrounous Exit Notification Content-Language: en-US To: Kai Huang , Dave Hansen Cc: Jarkko Sakkinen , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Sean Christopherson , Haitao Huang , x86@kernel.org, linux-sgx@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220720191347.1343986-1-dave.hansen@linux.intel.com> From: Dave Hansen In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/22/22 06:26, Kai Huang wrote: > Did a quick look at the spec. It appears ENCLU[EDECCSSA] should be used > together with AEX-notify. So besides advertising the new > SGX_ATTR_ASYNC_EXIT_NOTIFY bit to the KVM guest, I think we should also > advertise the ENCLU[EDECCSSA] support in guest's CPUID, like below (untested)? Sounds like a great follow-on patch! It doesn't seem truly functionally required from the spec: > EDECCSSA is a new Intel SGX user leaf function > (ENCLU[EDECCSSA]) that can facilitate AEX notification handling... If that's wrong or imprecise, I'd love to hear more about it and also about how the spec will be updated. Oh, and the one-liner patch that I was promised for enabling this is getting a _wee_ bit longer than one line.