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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CF9DAC433F5 for ; Sun, 6 Mar 2022 02:58:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E072510E8B9; Sun, 6 Mar 2022 02:58:09 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1394110E8B8; Sun, 6 Mar 2022 02:58:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=TvYRN1YmUBdHSWPYQwg2K3EE2AkUEhTFgrDPAkH+IiY=; b=mKq4YwMS6eUAxFggJkyGM2x7hn C6PrW9vm1cR73JF+afzt0DHevDIgFxF8zX+NMeez5fBEFTChhRgNzjz71qFtB4NPllNdVa/PJHKHA sTyZt6GjlkEZ30FyhadWd78j/rNd6vWnWjuX6Rh84K3pLCg2Je1zHkIFf1VDTv2/Eeh3wqt/oEQyX UznNY0HjgIGb/bYsVBZhZu9zFIfUu7F48Q8tEEJHDryC+pNpdNViBX8BnpsvkA+FwmuCTl9+vxCCH BH8zaYFk9GHzvTXZA+AbTajg5+My6nID+Go5DHMCGTB7EFc3mXzx2e5FHcvkLmgKaFosZfV6fweUl 4HJ1/eYg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nQh5n-00E3CB-Eu; Sun, 06 Mar 2022 02:57:55 +0000 Date: Sun, 6 Mar 2022 02:57:55 +0000 From: Matthew Wilcox To: Jarkko Sakkinen Message-ID: References: <20220306021534.83553-1-jarkko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220306021534.83553-1-jarkko@kernel.org> Subject: Re: [Intel-gfx] [PATCH RFC] mm: Add f_ops->populate() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nathaniel McCallum , linux-unionfs@vger.kernel.org, intel-gfx@lists.freedesktop.org, Dave Hansen , linux-mips@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Andrew Morton , Reinette Chatre , codalist@coda.cs.cmu.edu, linux-sgx@vger.kernel.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Sun, Mar 06, 2022 at 04:15:33AM +0200, Jarkko Sakkinen wrote: > Sometimes you might want to use MAP_POPULATE to ask a device driver to > initialize the device memory in some specific manner. SGX driver can use > this to request more memory by issuing ENCLS[EAUG] x86 opcode for each > page in the address range. > > Add f_ops->populate() with the same parameters as f_ops->mmap() and make > it conditionally called inside call_mmap(). Update call sites > accodingly. Your device driver has a ->mmap operation. Why does it need another one? More explanation required here.