Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp743247imi; Fri, 22 Jul 2022 08:30:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v7YMhJDGHASDU+1h70P6+LfCWTsJkheCGBaxOiDNU+H9zB++iSubgFzVY9KG4hQhg6WEYB X-Received: by 2002:a17:907:7637:b0:72b:3a3b:7d68 with SMTP id jy23-20020a170907763700b0072b3a3b7d68mr346236ejc.566.1658503801130; Fri, 22 Jul 2022 08:30:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658503801; cv=none; d=google.com; s=arc-20160816; b=GRRMzIUD3g7+0gHNDxzF1vS6dw3C1uvIVH3egaTh/XlA9nvdl44tM6ewspNAEh7CKq +CT5ZN40J7UXwMTGqrv1ePZSawLbQ6vXYbK8Guce/3hkd35hJCyttq5RAqM664X5BHF9 eKmp5qmXetG+97LNcO19xo6jSE0Yd7D4Y1uhizEa1yIitwsQHkN18UPBYm6ofviYn48L PB2Ue/4d4gScIO66w25hnhEzvQ3TDQNsl/EPzs+jvgq3KmL+KV2+DupGKYFgAw/AXGO6 eiVkKS9bNCuuQMcSExWEfiBbLnKIDmQHPBQfD7KjDjj4PxQ1BOqdPXrW5R4CYtH8Hq4A Zn6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=xHziBrNMy0CM1qRbR7C4bSR909KoG4M3vYU2tni87Aw=; b=kpNQcr5DvgHIa1RMIZnaqMSbX6JNdHOS1Yyc6yPJSRiOPETQi04Er9MFoNMFIzXmzA rEvzPlFa3nsvR1wJckf6kJR9Ijvk2/Jq84MFCCjaE5TKgHqG/iV9MtKozDLvQqaNBPG1 8C5ivumU0T1Pz7HIKAdj99Fl5T6GNlhy/PJZrAoJzcC0+rMraisT0ctyQ5/qsX2VX1Aa ZQRJM6kKnEr0Hev36Lb5g/LKmWKSoKiWWZ3qap0u4nb8VJIIU9I3vDkYywEkd3SjF+Gt n5qVXNAq81IQQ/Xo1NHeU80rfolBfgYHx2bIC1JuoUtdXWkqMa6XkkNX0cejboX/aNDr sN5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kfZUyhMC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h2-20020a0564020e0200b0043bca751775si4189028edh.363.2022.07.22.08.29.34; Fri, 22 Jul 2022 08:30:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kfZUyhMC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235689AbiGVPVw (ORCPT + 99 others); Fri, 22 Jul 2022 11:21:52 -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 X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.