Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6333385iob; Tue, 10 May 2022 16:15:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOkzS6A0jqyGcpwWTtd/CL9f4Vg7v74NM9CDr3BP3V9bJGGV9wfLLmwKljeJLd4TeADaKj X-Received: by 2002:a17:90b:368e:b0:1d8:fcd2:c6ca with SMTP id mj14-20020a17090b368e00b001d8fcd2c6camr2211469pjb.44.1652224508321; Tue, 10 May 2022 16:15:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652224508; cv=none; d=google.com; s=arc-20160816; b=gcaBoeJMVTSt1sVgCATlDAlpA6WKR6nDVjtjwbiZRz2LO+Gl0ykqzhp/J407ZCZiqb V9+b2HL+iab+ivB77gUWgfx6d6Nc+yCOIyq+sxpjcYm9SjJZyo+QmALq2TwtYt9kXGqT nXgWJGbzo+1/19ltREY/LGNdDfVzEYgbOBPXjQn+vcC0IaVqesX0yoROfF+kmJ9QA/zN RJ+TVH+0gGBLpgCSlhONB6LpcQyvR+CHvpwhHfPl/9/ML7eWjR+m+PKfoAhmSbJTysQ8 yLDfZtK1fv9IMQPOLPfv3c9kubz+j9nwikxicHNkynEV5c9GzTqvu+9LFLnFmn4vR1/z /Atw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Kt22zSUqNihq6o3yAoi1iLRDriiyhjTKivCC44RF+uk=; b=WVqPojqi9mBYFtu09GjnK4eZAa8O6sRtdzXIkXUYzZX+hpL4IbWpUruyrOxEmh/Ulk eeotwFeQL9D1TMnpyvrT5mS/QRsy/j5YeyQWybU/j5BCx9jHxhEPWDhYLgZUXWzCSWJx qZgMSFN0E9aFmIhD9Jkv+6rJi2vg6GQYbvfGAtGXf+QRMYPTx220jock3JquteM+oyFm ZmF1Y+q6I7drAqEWI7fUEgEOiXS56lImpjCD0FvSUG8uU1RCcxsGzOF8JhkAuDeJv0em h3u1C0z0b04rh+ZxtRTaQxYoZKxJuv+w+eyGhi/usQfRsLtgGvTUjFsBgow9rTELy1I9 NWDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VaytJpzS; 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 t10-20020a1709028c8a00b0015870834b16si343937plo.549.2022.05.10.16.14.54; Tue, 10 May 2022 16:15:08 -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=VaytJpzS; 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 S1347221AbiEJSOG (ORCPT + 99 others); Tue, 10 May 2022 14:14:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348546AbiEJSNV (ORCPT ); Tue, 10 May 2022 14:13:21 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D36AD2DD79; Tue, 10 May 2022 11:09:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652206162; x=1683742162; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FJfKrMjaKbMfb8RS0t6IxubSzc4FXrABp9R8uuhlVVo=; b=VaytJpzSrvCOafL2xFPaZYgkQka4nKWvmnzLUfY/DNYjvNmfrvUw355f XMKJol+xcKELDxQOI4pe0jVNJln7vXCfVwArwXbWnm+e3QRY4xCn5Y/HA 5Fk09OTjy41Yu+FT1MvlhDCOphyoQ0LabvKab0YChijjbjTsgTXqaYzmF xFVRw2kDCGzu6et03GaZF9ByaZMhU2+5dscoMI2GcAkyiEj/CfZgs6fZV yPlrI4jAWmL+NAoLDzLCqEwg+I0M3kXgBsaID00nJvSwY2X9tmRsEK/Mq c+hDJGsNLwy+2x9mWR3SSgJgyhi45aVD3rS5H7Z+H/LRWG1UwF35NYOFv w==; X-IronPort-AV: E=McAfee;i="6400,9594,10343"; a="330057516" X-IronPort-AV: E=Sophos;i="5.91,214,1647327600"; d="scan'208";a="330057516" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2022 11:09:16 -0700 X-IronPort-AV: E=Sophos;i="5.91,214,1647327600"; d="scan'208";a="541908770" Received: from rchatre-ws.ostc.intel.com ([10.54.69.144]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2022 11:09:16 -0700 From: Reinette Chatre To: dave.hansen@linux.intel.com, jarkko@kernel.org, tglx@linutronix.de, bp@alien8.de, luto@kernel.org, mingo@redhat.com, linux-sgx@vger.kernel.org, x86@kernel.org, shuah@kernel.org, linux-kselftest@vger.kernel.org Cc: seanjc@google.com, kai.huang@intel.com, cathy.zhang@intel.com, cedric.xing@intel.com, haitao.huang@intel.com, mark.shanahan@intel.com, vijay.dhanraj@intel.com, hpa@zytor.com, linux-kernel@vger.kernel.org Subject: [PATCH V5 09/31] x86/sgx: Make sgx_ipi_cb() available internally Date: Tue, 10 May 2022 11:08:45 -0700 Message-Id: <1179ed4a9c3c1c2abf49d51bfcf2c30b493181cc.1652137848.git.reinette.chatre@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 The ETRACK function followed by an IPI to all CPUs within an enclave is a common pattern with more frequent use in support of SGX2. Make the (empty) IPI callback function available internally in preparation for usage by SGX2. Reviewed-by: Jarkko Sakkinen Signed-off-by: Reinette Chatre --- No changes since V4. Changes since V3: - Add Jarkko's Reviewed-by tag. Changes since V1: - Replace "for more usages" by "for usage by SGX2" (Jarkko) arch/x86/kernel/cpu/sgx/main.c | 2 +- arch/x86/kernel/cpu/sgx/sgx.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/sgx/main.c b/arch/x86/kernel/cpu/sgx/main.c index bb0d5e8905be..bab2a2e13c70 100644 --- a/arch/x86/kernel/cpu/sgx/main.c +++ b/arch/x86/kernel/cpu/sgx/main.c @@ -174,7 +174,7 @@ static int __sgx_encl_ewb(struct sgx_epc_page *epc_page, void *va_slot, return ret; } -static void sgx_ipi_cb(void *info) +void sgx_ipi_cb(void *info) { } diff --git a/arch/x86/kernel/cpu/sgx/sgx.h b/arch/x86/kernel/cpu/sgx/sgx.h index 0f17def9fe6f..b30cee4de903 100644 --- a/arch/x86/kernel/cpu/sgx/sgx.h +++ b/arch/x86/kernel/cpu/sgx/sgx.h @@ -90,6 +90,8 @@ void sgx_mark_page_reclaimable(struct sgx_epc_page *page); int sgx_unmark_page_reclaimable(struct sgx_epc_page *page); struct sgx_epc_page *sgx_alloc_epc_page(void *owner, bool reclaim); +void sgx_ipi_cb(void *info); + #ifdef CONFIG_X86_SGX_KVM int __init sgx_vepc_init(void); #else -- 2.25.1