Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8574703ybl; Thu, 16 Jan 2020 19:59:48 -0800 (PST) X-Google-Smtp-Source: APXvYqyLass7ptwmdgdPJC3H7QxGazSyKyqBz0IFqJrfKzCdQygC3EsNiqwq2deCLfvarzl4e6LO X-Received: by 2002:a05:6830:1e8a:: with SMTP id n10mr4678029otr.303.1579233588684; Thu, 16 Jan 2020 19:59:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579233588; cv=none; d=google.com; s=arc-20160816; b=DhHLp+J0Esi1fXt7Liln5Qr5/DmFHkunJIOVC83jWuNhQ7Uw6fLrq+Vk8mZr1RhO57 lCn2YkgrWpBrcSnq5Fi0hxTJo/BOAcfcfhRrJAQid9qN7wgT2s+92Ipq8DRCn467tbZE U5rFbB485FZWSBf/hJ1dGjPRuu9ORURK09HO2t5xQpA0IEgSBmcOFZN/z8QenoPZyfnf EeI8AI3sqcxhRjmaPmI6vvr/zWU8LqjPuDNoOfea+cyUzLoGehUotnmpW/dVZq2z4F02 mo116MfhObXRKjdaJOmtEaKamPbC6301BMT5LZgPsqyJyrwOlXjuGgzl+YxTJqrMzP08 b9Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date; bh=3prg4WRJWc4h6xlTRI++10+eBZSrS4XRix8jFSWISZg=; b=wFtvKB2jHmbUcyaEaJRXBuu6Pn1yqnLiQMLRCmHsg1J8CwgHf/vko6MoRmheTgerZN KOVIr9YNnls29L4S+QugeATmSO9u3KQ+gAWg90dJ4uQX9n3w5IeDqpDNaiiJ8cmqed85 qG9/VNazE3ea83nkPRMi2NfCYR2aUJLGeDPJNGP5H5XSIGzZvmd8L9MjYTlLHjuqQYJY XZ8uD2Xk0vswKaLPgmbGmwLR4yuWi374vCRRbkul1D9XS0se/oQdJ9GK7KRTOCJZSspN ZlkwcOAuhrCyREF5ru9CeR+0s8Q0rkdvY31Zv2yaHpDTJiqS2wFq68/yfKHsejcfb87p 0wYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id s68si13697629oih.275.2020.01.16.19.59.37; Thu, 16 Jan 2020 19:59:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S2388836AbgAQC10 (ORCPT + 99 others); Thu, 16 Jan 2020 21:27:26 -0500 Received: from mga04.intel.com ([192.55.52.120]:46362 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388787AbgAQC10 (ORCPT ); Thu, 16 Jan 2020 21:27:26 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jan 2020 18:27:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,327,1574150400"; d="asc'?scan'208";a="214325648" Received: from zhen-hp.sh.intel.com (HELO zhen-hp) ([10.239.13.14]) by orsmga007.jf.intel.com with ESMTP; 16 Jan 2020 18:27:23 -0800 Date: Fri, 17 Jan 2020 10:15:39 +0800 From: Zhenyu Wang To: Julian Stecklina Cc: Greg KH , Thomas Prescher , linux-kernel@vger.kernel.org, Zhenyu Wang , hang.yuan@intel.com, dri-devel@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, zhiyuan.lv@intel.com Subject: Re: [RFC PATCH 4/4] drm/i915/gvt: move public gvt headers out into global include Message-ID: <20200117021539.GA6715@zhen-hp.sh.intel.com> Reply-To: Zhenyu Wang References: <4079ce7c26a2d2a3c7e0828ed1ea6008d6e2c805.camel@cyberus-technology.de> <20200109171357.115936-1-julian.stecklina@cyberus-technology.de> <20200109171357.115936-5-julian.stecklina@cyberus-technology.de> <20200115152215.GA3830321@kroah.com> <9b32e225ee680e61716e300eb1ed8387599cc0dd.camel@cyberus-technology.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TB36FDmn/VVEgNH/" Content-Disposition: inline In-Reply-To: <9b32e225ee680e61716e300eb1ed8387599cc0dd.camel@cyberus-technology.de> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --TB36FDmn/VVEgNH/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020.01.16 15:13:01 +0100, Julian Stecklina wrote: > Hi Greg, Christoph, >=20 > On Wed, 2020-01-15 at 16:22 +0100, Greg KH wrote: > > On Thu, Jan 09, 2020 at 07:13:57PM +0200, Julian Stecklina wrote: > > > Now that the GVT interface to hypervisors does not depend on i915/GVT > > > internals anymore, we can move the headers to the global include/. > > >=20 > > > This makes out-of-tree modules for hypervisor integration possible. > >=20 > > What kind of out-of-tree modules do you need/want for this? >=20 > The mediated virtualization support in the i915 driver needs a backend to= the > hypervisor. There is currently one backend for KVM in the tree > (drivers/gpu/drm/i915/gvt/kvmgt.c) and at least 3 other hypervisor backen= ds out > of tree in various states of development that I know of. We are currently > developing one of these. >=20 > >=20 > > Also, as Christoph said, adding exports for functions that are not used > > by anything within the kernel tree itself is not ok, that's not how we > > work. >=20 > The exports are used by the KVM hypervisor backend. The patchset I sent > basically decouples KVMGT from i915 driver internals. So personally I wou= ld > count this as a benefit in itself. >=20 > There is already an indirection in place that looks like it is intended to > decouple the hypervisor backends from the i915 driver core: intel_gvt_ops= =2E This > is a struct of function pointers that the hypervisor backend uses to talk= to the > GPU mediator code. >=20 > Unfortunately, this struct doesn't cover all usecases and the KVM hypervi= sor > backend directly touches the i915 devices' internal state in very few pla= ces. My > current solution was to wrap these accesses in accessor functions and > EXPORT_SYMBOL_GPL them. >=20 > If the more acceptable solution is to add more function pointers to > intel_gvt_ops instead of exporting symbols, I'm happy to go along this ro= ute. > That depends on the hypervisor requirement and purpose, if it requires gvt device model for some function e.g emulate mmio, we want it to be a general gvt_ops, if it just trys to retrieve some vgpu info, we might see if some common wrapper of internal data would be more easier. > > And why do they somehow have to be out of the tree? We want them in the > > tree, and so should you, as it will save you time and money if they are. >=20 > I also want these hypervisor backends in the tree, but from a development > workflow having the ability to build them as a out-of-tree modules is very > convenient. I guess this is also true for the developers working on the o= ther > hypervisor backends. >=20 > When I looked at the status quo in i915/gvt a couple of weeks ago, it see= med > like it would be a win for everyone. Let me just clearly say that we have= no > intention of doing binary blob drivers. :) > yeah, we do like to see more hypervisor support and make more clear interfa= ce between core device model with that. thanks --=20 Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827 --TB36FDmn/VVEgNH/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQTXuabgHDW6LPt9CICxBBozTXgYJwUCXiEYywAKCRCxBBozTXgY J7VAAJ4+GPxnpxcifJMey1RQ7Tu+IykKMQCdFGYEJ8xf6HRdloBoM5olfjQ3+Wo= =4F3W -----END PGP SIGNATURE----- --TB36FDmn/VVEgNH/--