Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp104928pxb; Wed, 29 Sep 2021 22:30:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqRM0rXF+y/SrsP31gp5CRcS2MYfQNIQUcDCDIVziKvAnet8dgTpCt5TDXgLb6SeMkLH97 X-Received: by 2002:a05:6402:510b:: with SMTP id m11mr5103761edd.82.1632979837313; Wed, 29 Sep 2021 22:30:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632979837; cv=none; d=google.com; s=arc-20160816; b=GZ2lNvxtRAMi/sbxtbElKbC803wmQEuuRJTzxrDTft6vMfKH5eBDAeHmWaYmbReBS6 iw2xsOdWQzqXfpXuX1euc7s2IUai2gcKNg+isSF2ohvkE3ePUOS3l4SdSso6FQ1QBud7 oGM+feMuPb2Wz7fvF7y0aTb89BaT55qvn37rtqpS3kq/3iC4wo/wSc4ZGZgTKqolIT/y G2ixavI5foglpuGJqxyTVUtbCe7JgLQwNlKkdCvyEtmYCrkeDZQnACrTJu4Xbrr0Yd9F YyVbxJ9GWdt1+kMIPyTQpex+axO+IP6JcKjV9tRs4zX7jaaqj2GZe0raCAt+1MwLEMIR QS3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=TdNR2oV02/HGbg4iyTbZPZHzNTJrSLg7e/yghGNtYs8=; b=c9Ne2L1FKS8OuwRgsR3jD4+7HujW0N4GIoqdUYbDWLZH0/KDq6PeMTFpCgLeC6+hDN lJAaZiJrOUP4dfk+UbapPJZ88kFlym/YVMBCJM4D8oFF//aKMmo1LZe2UwBH0+KRupK0 PWTCA4lzReZHtCuGQMVCo9CZePK72VkYC6jt7k5/woQ1N34/qh5HwrK2NYcmo4ptYhMO Mdvv2xnNam/o1HAwXBJlW4Cv3bJYZDMTvwAafAdV6T0FZBwPBq2dMMqtXIdKuCSb61cc cOs2+Cw9k9hbAUxXz28aq83RXIiY6ZiE4njF/6sCXoL3t69NviEBvoR5k+7HNxelKJY5 3Jjw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r21si2918402ejo.47.2021.09.29.22.30.13; Wed, 29 Sep 2021 22:30:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348047AbhI3FZt (ORCPT + 99 others); Thu, 30 Sep 2021 01:25:49 -0400 Received: from verein.lst.de ([213.95.11.211]:58178 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347973AbhI3FZt (ORCPT ); Thu, 30 Sep 2021 01:25:49 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 896FC67373; Thu, 30 Sep 2021 07:24:02 +0200 (CEST) Date: Thu, 30 Sep 2021 07:24:02 +0200 From: Christoph Hellwig To: "Wang, Zhi A" Cc: Jason Gunthorpe , Luis Chamberlain , Jessica Yu , "De Marchi, Lucas" , Zhenyu Wang , Christoph Hellwig , "dri-devel@lists.freedesktop.org" , Greg KH , "intel-gfx@lists.freedesktop.org" , Joonas Lahtinen , "linux-kernel@vger.kernel.org" , Jani Nikula , Gerd Hoffmann , "Vivi, Rodrigo" , "intel-gvt-dev@lists.freedesktop.org" , "Nikula, Jani" Subject: Re: refactor the i915 GVT support Message-ID: <20210930052402.GA21841@lst.de> References: <20210817052203.GX13928@zhen-hp.sh.intel.com> <20210819082929.GB13928@zhen-hp.sh.intel.com> <20210820141724.GA29034@lst.de> <20210826061219.GD9942@zhen-hp.sh.intel.com> <55c11f22-99e5-6109-3be3-a04b06b3336e@intel.com> <20210928150507.GM964074@nvidia.com> <24c7bbec-b425-52fb-d3f9-539a0a391dfa@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <24c7bbec-b425-52fb-d3f9-539a0a391dfa@intel.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 29, 2021 at 06:27:16PM +0000, Wang, Zhi A wrote: > Thanks for the idea. I am not sure i915 guys would take this idea since > that it's only for GVT-g, i915 doesn't use this at all. We need to take > a snapshot of both PCI configuration space and MMIO registers before > i915 driver starts to touch the HW. > > One idea is we capture the registers in intel_gvt.c during the early > initialization and do everything else when i915.ko is fully loaded. But > how about dependence between i915.ko and kvmgt.ko? We cannot do > request_module("kvmgt") in i915.ko. > > Maybe Christoph can give more input on this and how we can deal with > this? Before we figure out an solution, we have to pick that patch out > since it blocks our pull request schedule. > > Also I was thinking if moving gvt into kvmgt.ko is the right direction. > It seems the module loading system in kernel is not designed for "module > A loading module B, which needs symbols from module A, in the > initialization path of module A". I have a few idea on how to sort this "deadlock" out. But I'm completely swamped until the end of next week, so I won't get to anything before that.