Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp94020pxh; Tue, 9 Nov 2021 07:48:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJzNbMDfNIiSCLwW19LtUcJBfNbatr9gxNEg5EG/Nc13zfGO3zFj+ZrKDzz3YDcrOHXmz0F5 X-Received: by 2002:a17:906:2606:: with SMTP id h6mr10783020ejc.301.1636472936387; Tue, 09 Nov 2021 07:48:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636472936; cv=none; d=google.com; s=arc-20160816; b=itBxS9twdqIivBpkMowneMulK43fBVTZqqs3FvyP4D23y+CwrRfy/9iJnkNHsahaRF bYOcG2Su2071uURqosh3poQW/jwRqMW6eaLG2A9SUcVHra8VdbCSWW4HAUaRQs/s97Qt fwOGtk+g1lfrROCDJUez+3u3miU1XIwNIlIBu5D/Dk53dpDJNRAZUkQzhrpMzN048Hkv pV11Dle0LXND4JYTTWtfw/CAKW/iBV1NoiPaGAwlO/vzV5eFlibfWg3S5/E+LOUFFp7F hPXD+C75G0E7vv8FNlLqwSo6uD7o8WY4At9TGJEfAVWRpCTQ1KNMI1hNvbE8jw9zHsiK O2RQ== 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=zlwzPHeS4lGsGHq09fwM/B8Y4XZdD1PRxB34hudag1g=; b=GAB6sVu49SLCbpyZWIU26iLHNqTzz0yxw2s7TkQVFlpUYYd3u6ixs6BAJ8Rn/nd3uc ZDLYCOmnCB46fHpwGsemMEuggZAzEQnSARdZ79J74N1yFnCHVSjJM6Pye9jx2VrznU6D LxLdBVyVs2rNgRYhKJyDk1G7MN0f0zUVeMvOlDf30FWU97SLae1GBMUV/6efI3LHDioU aMyrIiRwAdlLoOf2SOLkUNjVYnPBWEf7x3dn+kl2nfoNfQqxkaRUO7tC54q8xbmOhPyE 2dIKQwSTRfgjMz6DghpLjOqAEDfCk2JNgZOk4h+PpL+81NVNsdm6mpVrqvmNwSYu9ACs JJ6Q== 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 h12si45573250ede.403.2021.11.09.07.48.16; Tue, 09 Nov 2021 07:48:56 -0800 (PST) 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 S243747AbhKIHxx (ORCPT + 99 others); Tue, 9 Nov 2021 02:53:53 -0500 Received: from verein.lst.de ([213.95.11.211]:48879 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235217AbhKIHxv (ORCPT ); Tue, 9 Nov 2021 02:53:51 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 7B51568AFE; Tue, 9 Nov 2021 08:51:01 +0100 (CET) Date: Tue, 9 Nov 2021 08:51:00 +0100 From: Christoph Hellwig To: Jani Nikula Cc: Zhi Wang , joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, zhenyuw@linux.intel.com, zhi.a.wang@intel.com, jgg@nvidia.com, intel-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, hch@lst.de Subject: Re: [PATCH 1/3] i915/gvt: seperate tracked MMIO table from handlers.c Message-ID: <20211109075100.GA27284@lst.de> References: <20211108212718.10576-1-zhi.a.wang@intel.com> <875yt17qzs.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <875yt17qzs.fsf@intel.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 09, 2021 at 09:00:39AM +0200, Jani Nikula wrote: > On Mon, 08 Nov 2021, Zhi Wang wrote: > > From: Zhi Wang > > > > To support the new mdev interfaces and the re-factor patches from > > Christoph, which moves the GVT-g code into a dedicated module, the GVT-g > > MMIO snapshot still needs to be saved in i915 so that the inital clean HW > > state can be used for the further vGPU. Seperate the tracked MMIO table > > from GVT-g, so that GVT-g and i915 can both use it. > > Do you really have to both put code in a header and then include that in > multiple places? > > I think you may need to rethink the whole approach, maybe make them > actual tables instead of code. Without understanding this code too well: an approach that makes in actual table and uses an accessor seems more useful to me as well.