Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4226047rwb; Fri, 30 Sep 2022 15:07:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5xQ+mFwY3eDiICNnUTfbtW+GQnC9NQd7QbGSkjFNcwYSBUYeLgQNpgziucN1Gf6spDiXwZ X-Received: by 2002:a17:906:844a:b0:77c:1d87:b81e with SMTP id e10-20020a170906844a00b0077c1d87b81emr7714492ejy.675.1664575656716; Fri, 30 Sep 2022 15:07:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664575656; cv=none; d=google.com; s=arc-20160816; b=PT+k4IJAyxAfbBi9kAi9YCnnYplY1VUzQGNqXh5vHX/eswIDfiUh3P7uQheZBCb/ey 5Bx4YlXyT1wZWHKY4cHDHH8zZK7O56Cq5e9gDcDK4vFNN8quJenyKzmh9crKxHISDUUC 6XGp3eKuKymtlz2sxNgo98xhF4cJEiCANs6j9N+qHkMEmqCJN/GvVVwVr4Ge/vu0W4Ei Fkqqyl+fZQjfY6qWh8dHzurogHJDY4SCS3pJ7qGFu6mtKv/5rDDle3PgeCF9D31iJ/cM CSSVb5H9W2zSb14DPeH/yY2izzW89IEKVLjwb4rakETiprWG3a3wnPl+Lp3PUqCAB1c6 ZgCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0Bb0so0Y8jD3hPcMm3ML3CVpDo1eUQTdmrIKGVALfiU=; b=y84qa7GXBfEQrD/SgYHr9PfWvC9qS65/RcfP1txt6eqmZ8q7vbvtdedf1i4zlbHx5a 9rD2TxL3k15koaDvYlaZKsUh1BCWkC5Xd2p6O0Rpjzj6v7CVMeN8zRmJikwr7ilV1AGL vNkVgwKtw80wb6Mpaxj4oxG0MeC1OvpSJH1qrIVOVKv5Rjhx9vyCiIIS4CpwcS0MHKPX nEL8hArD+O0Ar5Dd1JjbqWJaQUAhZcd7R1/WbpKT+fJLVUFs1HQnEfXDkOCwG+a0a/c6 d8lK/o6JXC0oDg7bErkIRqUNfWydbHnHpRUEtYuXSjc2CStrnioVLvau+r3h7gak8i1r TYUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="h/DElLj6"; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk10-20020a1709077f8a00b007878382a737si2650092ejc.115.2022.09.30.15.07.11; Fri, 30 Sep 2022 15:07:36 -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=@kernel.org header.s=k20201202 header.b="h/DElLj6"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231561AbiI3Vzn (ORCPT + 99 others); Fri, 30 Sep 2022 17:55:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbiI3Vzk (ORCPT ); Fri, 30 Sep 2022 17:55:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FE296CD2E; Fri, 30 Sep 2022 14:55:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B4764B829E2; Fri, 30 Sep 2022 21:55:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED9EAC433C1; Fri, 30 Sep 2022 21:55:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664574936; bh=npvB9opLg4Nzboa6nHFQ61VUy2QLxuMzGBt4Aa2MrQQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=h/DElLj6xMf3bz7zX7ODdh22Ly15aejRwZXfI0ECMOPZHn4NtQ+KEM7g+xCeXSHio I5de5h5NrmjhDVCNtlMiQ+QNWTmfwaWEKN0byUHHk3Tt6wT8r32+hfnYw16afNtES8 lp8mb0n6xY4HBGBynqTijJLB+STslcbLch54QksglZFpwNTrZYYdAjvJSwTWbDrxkh d/bUaBeHZ/dOXsFgQs3okdh+GfLGHTVzHPR9kGvbqwWsqQGZEDWIfSUGUmX1k+MQT2 qV3l3QEVuOfYflY3Sh89dLz2OBOYi61FmXp9uCudCX9gT8ajMvOTaZakkHkdLyo/n3 NuvWxoI/Xb/Rg== Date: Sat, 1 Oct 2022 00:55:33 +0300 From: Jarkko Sakkinen To: Kristen Carlson Accardi Cc: linux-kernel@vger.kernel.org, linux-sgx@vger.kernel.org, Dave Hansen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , ira.weiny@intel.com Subject: Re: [PATCH] x86/sgx: Replace kmap/kunmap_atomic calls Message-ID: References: <20220929160647.362798-1-kristen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220929160647.362798-1-kristen@linux.intel.com> X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Thu, Sep 29, 2022 at 09:06:46AM -0700, Kristen Carlson Accardi wrote: > It is not necessary to disable page faults or preemption when > using kmap calls, so replace kmap_atomic() and kunmap_atomic() > calls with more the more appropriate kmap_local_page() and > kunmap_local() calls. > > Signed-off-by: Kristen Carlson Accardi Missing "why". I believe you're right but since the existing code is working, you should extend the reasoning just a bit. BR, Jarkko