Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1514840pxb; Fri, 20 Aug 2021 07:18:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzD/4jbjxuKDoMYDLbUSyWrjIpCsW7VTV90oGdmob+HSz6TeGp0/HM8dH2eRR0VNZUQfaw7 X-Received: by 2002:a05:6602:2c10:: with SMTP id w16mr16128315iov.149.1629469129073; Fri, 20 Aug 2021 07:18:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629469129; cv=none; d=google.com; s=arc-20160816; b=J7stlF0GPvaqoC0IJ/bz/+52E9R/MJMd4MgOQViRvHTHK/rEFuXXlgImAJ3UdF/x7a OSu4QE/LepfJrMLBA+T53rtyYwI73jZDURZcQtxicqDS7dBfiZEMo1hD2Ct5f2hwNVi/ ZGgV7G5551gMJ5j+xL5XKMiRB70zAXFaK+tbyMCCmDV9bsOzeaCEHcv7eMyMIyYhnzEe OjfXX1CR1p3MC3AL3D41nRBxJd3tSC0zEWC23D5QHKTcQeuGOzuUSy/F+j5x5R5EzVXA suP5xn8LtbukAu3PpBSs8o3zaRA/b3kquyBC5OG7ncmsqzn0WvHvl7pEqGGaefM9Y5cL fLZg== 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=H1FgfrE2TN8ofTaY7ciEo37wS06ODMSOVcWTsp49zhU=; b=hx+tDr0TtdVvTsqGZUTQaroHuQEVrtyA7thiG0pNCCYr7f0Y70jMM5SSCUNM2ZXpnq eNKw25FcqPPno36RvLtyofnuiYwNRMg9rF5I1APQ1pNJNXLquo2yj8aBR+VcASkOa2Yn sg4rvahtzmdnLiL1pb6PKLvgpGD6UVJzItFotvlEk0vzTFE0a/E9JCSSNqGvC5m+c4xi /004EMVjBz9Ugf4mPP7F/VVa58CPOvlt2DX4LKGzY8iOM4QmWfgqtS/5WszRI3ZTr4iP BNZMv9my+0cEftLq1ZhnNOnIXj8qYCPxNVWo7F0M8fbBMvR4xC5EP2r1Ft+PLXiobtfD 0AFQ== 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 j23si6291718jam.32.2021.08.20.07.18.37; Fri, 20 Aug 2021 07:18:49 -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 S240816AbhHTOSG (ORCPT + 99 others); Fri, 20 Aug 2021 10:18:06 -0400 Received: from verein.lst.de ([213.95.11.211]:41193 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235032AbhHTOSF (ORCPT ); Fri, 20 Aug 2021 10:18:05 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 13C3E6736F; Fri, 20 Aug 2021 16:17:25 +0200 (CEST) Date: Fri, 20 Aug 2021 16:17:24 +0200 From: Christoph Hellwig To: Zhenyu Wang Cc: Christoph Hellwig , Jason Gunthorpe , "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" , "Wang, Zhi A" , Jani Nikula , Luis Chamberlain Subject: Re: refactor the i915 GVT support Message-ID: <20210820141724.GA29034@lst.de> References: <20210728175925.GU1721383@nvidia.com> <20210729072022.GB31896@lst.de> <20210803094315.GF13928@zhen-hp.sh.intel.com> <20210803143058.GA1721383@nvidia.com> <20210804052606.GG13928@zhen-hp.sh.intel.com> <20210816173458.GA9183@lst.de> <20210817010851.GW13928@zhen-hp.sh.intel.com> <20210817052203.GX13928@zhen-hp.sh.intel.com> <20210819082929.GB13928@zhen-hp.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210819082929.GB13928@zhen-hp.sh.intel.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 19, 2021 at 04:29:29PM +0800, Zhenyu Wang wrote: > I'm working on below patch to resolve this. But I met a weird issue in > case when building i915 as module and also kvmgt module, it caused > busy wait on request_module("kvmgt") when boot, it doesn't happen if > building i915 into kernel. I'm not sure what could be the reason? Luis, do you know if there is a problem with a request_module from a driver ->probe routine that is probably called by a module_init function itself? In the meantime I'll try to reproduce it locally, but I always had a hard time getting useful results out of a modular i915, especially when combined with module paramters. (no blame on i915, just the problem with modules needed early on). > > > But the problem I see is that after moving gvt device model (gvt/*.c > > except kvmgt.c) into kvmgt module, we'll have issue with initial mmio > > state which current gvt relies on, that is in design supposed to get > > initial HW state before i915 driver has taken any operation. Before > > we can ensure that, I think we may only remove MPT part first but > > still keep gvt device model as part of i915 with config. I'll try to > > split that out. > > Sorry I misread the code that as we always request kvmgt module when > gvt init, so it should still apply original method that this isn't a > problem. Our current validation result has shown no regression as well. What does initial mmio state mean? This is something new to me. But as you said in this mail unless I missed something very big it should work the same as before. > -static inline void intel_context_unpin(struct intel_context *ce) > +static inline void _intel_context_unpin(struct intel_context *ce) > { > if (!ce->ops->sched_disable) { > __intel_context_do_unpin(ce, 1); > @@ -150,6 +150,7 @@ static inline void intel_context_unpin(struct intel_context *ce) > } > } > } > +void intel_context_unpin(struct intel_context *ce); Looking at intel_context_unpin/_intel_context_unpin is there really a need to have this inline to start with? It don't see much the compiler could optimize by inlining it.