Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1635921pxb; Thu, 4 Nov 2021 06:01:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOUGpbCeJ7tI/hO8/Ft0El/vnwJGgCuiSgB1DSqms/eefgUfqQortiADb3q34lSkmsAyp1 X-Received: by 2002:a6b:e613:: with SMTP id g19mr7649121ioh.121.1636030887993; Thu, 04 Nov 2021 06:01:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636030887; cv=none; d=google.com; s=arc-20160816; b=cR2QYpxdTRshttzZmmK9Max29lmiH92fshAr4cflFSKG8foa9ffv2T/I3JK8NLKcqJ XDCdo/bjgbr5EghFoC3GTTm5m32iBRnYNatawfzRtuq32Fvl3ktAfY1icULMQ7WD91Pt MU7TvBKfMTdsBN+vPtfRH5xRi3w0cpHwlZXowEebG6x2KyRFAe5VTZqEeqJ/K+KpN2Lm x55fHKhTnlBRI/L0Ht+5PN3a/TI0SthY+TLeoCh9M+kx7jBwzEzgPuAkg+of9Uqkgqj6 ZzJVQdJa+JKH9Cv6T4UOK/fwhHueVUH4BOUNHUGnntmfxNFQlwDrGTNHYZ6uciV+TwYE v2DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:user-agent:message-id:organization:cc:from :subject:to:references:in-reply-to:content-transfer-encoding :mime-version; bh=r9PIutE4qpvuJBUcaIGByq8Ghk7KguAiz3H3tN6Tmh0=; b=zNhgURP/NM08CNbceldxDfjf34m04QQ93bzBQ6ZQyZxSoBjMVDecJUebNu7l6BfExn iEW0yLjapu7vOzRo8dQF5+6I6Tc9YiTNz/9cjiKOAqYkukPiK8QKEF3sBjpxt+HET3Wj Eh47NL/2YgCNE9hWSy4iM7tT5WfH/tEgdUMJU5mhsdujyc8S+KPQduZfdf9ReNdeJp5i 84w+510+6mw15YUv0DJ3zG9VI5F9sS4H1mw79O4adg35Z54q/rdIsMDVLkdRGv/BiHrG 52jn0bMUtkaXSg2wlJP/ORGCy8VuX8G14oLfupSo6g9jYpSUCcHIJesLSrv2X++eZ3U5 SldQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b69si6322197jab.32.2021.11.04.06.00.29; Thu, 04 Nov 2021 06:01:27 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230304AbhKDNCD convert rfc822-to-8bit (ORCPT + 99 others); Thu, 4 Nov 2021 09:02:03 -0400 Received: from mga03.intel.com ([134.134.136.65]:56310 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230091AbhKDNCC (ORCPT ); Thu, 4 Nov 2021 09:02:02 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10157"; a="231644507" X-IronPort-AV: E=Sophos;i="5.87,208,1631602800"; d="scan'208";a="231644507" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2021 05:59:24 -0700 X-IronPort-AV: E=Sophos;i="5.87,208,1631602800"; d="scan'208";a="450441783" Received: from agilev-mobl.ccr.corp.intel.com (HELO localhost) ([10.249.254.157]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2021 05:59:21 -0700 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT In-Reply-To: <20211102070601.155501-1-hch@lst.de> References: <20211102070601.155501-1-hch@lst.de> To: Christoph Hellwig , Jani Nikula , Rodrigo Vivi , Zhenyu Wang , Zhi Wang Subject: Re: refactor the i915 GVT support and move to the modern mdev API v2 From: Joonas Lahtinen Cc: Jason Gunthorpe , intel-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Message-ID: <163603075885.4807.880888219859400958@jlahtine-mobl.ger.corp.intel.com> User-Agent: alot/0.8.1 Date: Thu, 04 Nov 2021 14:59:18 +0200 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Zhenyu and Zhi, Can you have somebody from the GVT team to review the patches that are fully contained in gvt/ ? I also started discussion on patch 6 which is about defining the interface between the modules. I remember there is prior work to shrink the interface. Do you have links to such patches? The minimal we should do is to eliminate the double underscore prefixed functions. But I would prefer to have the symbol exports by default so that we can enable the functionality just by loading the module. Regards, Joonas Quoting Christoph Hellwig (2021-11-02 09:05:32) > Hi all, > > the GVT code in the i915 is a bit of a mess right now due to strange > abstractions and lots of indirect calls. This series refactors various > bits to clean that up. The main user visible change is that almost all > of the GVT code moves out of the main i915 driver and into the kvmgt > module. > > Tested on my Thinkpad with a Kaby Lake CPU and integrated graphics. > > Git tree: > > git://git.infradead.org/users/hch/misc.git i915-gvt > > Gitweb: > > http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/i915-gvt > > Changes since v1: > - rebased on Linux 5.15 > - allow the kvmgvt module to be loaded at any time and thus solve > the deadlock when both i915 amd kvmgvt are modular > - include the conversion to the modern mdev API > > Note that I do expect to rebased this again against 5.16-rc1 once > released, but I'd like to get this out for review ASAP. > > Diffstat: > b/drivers/gpu/drm/i915/Kconfig | 33 > b/drivers/gpu/drm/i915/Makefile | 31 > b/drivers/gpu/drm/i915/gvt/cfg_space.c | 89 -- > b/drivers/gpu/drm/i915/gvt/cmd_parser.c | 4 > b/drivers/gpu/drm/i915/gvt/dmabuf.c | 36 - > b/drivers/gpu/drm/i915/gvt/execlist.c | 12 > b/drivers/gpu/drm/i915/gvt/gtt.c | 55 + > b/drivers/gpu/drm/i915/gvt/gvt.h | 125 ++- > b/drivers/gpu/drm/i915/gvt/interrupt.c | 38 + > b/drivers/gpu/drm/i915/gvt/kvmgt.c | 1099 +++++++++++++++----------------- > b/drivers/gpu/drm/i915/gvt/mmio.c | 4 > b/drivers/gpu/drm/i915/gvt/opregion.c | 148 ---- > b/drivers/gpu/drm/i915/gvt/page_track.c | 8 > b/drivers/gpu/drm/i915/gvt/scheduler.c | 37 - > b/drivers/gpu/drm/i915/gvt/trace.h | 2 > b/drivers/gpu/drm/i915/gvt/vgpu.c | 22 > b/drivers/gpu/drm/i915/i915_drv.c | 7 > b/drivers/gpu/drm/i915/i915_drv.h | 1 > b/drivers/gpu/drm/i915/i915_trace.h | 1 > b/drivers/gpu/drm/i915/intel_gvt.c | 162 +++- > b/drivers/gpu/drm/i915/intel_gvt.h | 17 > drivers/gpu/drm/i915/gvt/Makefile | 9 > drivers/gpu/drm/i915/gvt/gvt.c | 340 --------- > drivers/gpu/drm/i915/gvt/hypercall.h | 82 -- > drivers/gpu/drm/i915/gvt/mpt.h | 400 ----------- > 25 files changed, 929 insertions(+), 1833 deletions(-)