Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2305317pxy; Tue, 3 Aug 2021 03:07:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZJ3agV4j8FuR+ttLehMJ7KeSM4J0njcEwvTZCU+XekBB2tESSHyqTTwQi+y5k4EdiqDWQ X-Received: by 2002:a5e:9e44:: with SMTP id j4mr408575ioq.171.1627985269938; Tue, 03 Aug 2021 03:07:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627985269; cv=none; d=google.com; s=arc-20160816; b=SkkldebA6eD0w2veGpcl/rZrUWEPy6sEifX/E1SfTBZ3rP3KosLqEnNrDx9jAd/Fgh K6RgMJmlLHIWR7iHqfmff9gyoRiBnhGKygdwcbQkIT44oKp2RQPj3vzfJVcPS+/PyOGH Igw247QBnV+3kCoqV4/AyPkluMJ1SnJzMHtc+8u/t0C9B0aXfgOL1X+CNxu5iK5NjlMB yIodGylm3PMqvUXrtklL1pRChC/TBdaHjf8i6esVIVmvUNQN76OgBk7ZvflEs8XlNMRL aonkrPgJGOjyPbolKZIR3UTP+UrvepFElTxigWx5fIb+O/YmsMAnwvx6okwhCWozQOqg bl5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date; bh=oJl73VjxiGiOHY2EhumW4T5VKCgpAN7z8S8NlvRBIlg=; b=qX5+T4qYAIvyZiWepuq+OzBEylAltgWTVYksiC1L8Q7sW1hGkEBWCEDDuWCpyGAyzR VP4AdkvCivy7s2/Za2o103hEoiHP2+LacrlKBWYuqe2VQuaDSPx2YJ3LBtewaLSS6xGa Fqek5V8nyh+Blxs0Q4iDE8wysIjnAHqwHuQP15c4pRoDFTtM3HN/Wu3tYTZlcioCNBmE DXGpg6gVM/DJ30TbK2LS5LBcdzgGOeMT+citqfM+/aVqpt5pdRiNrjNgoMNlWs9zy775 ZYG4wTYfN78yAaIsyW6si/QAJ7xWpRhtjbODB2XeHMWXvXnN+IyZExpvS9xyjzUstI5X nRDA== 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 g15si4787626jan.75.2021.08.03.03.07.38; Tue, 03 Aug 2021 03:07: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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235240AbhHCKG6 (ORCPT + 99 others); Tue, 3 Aug 2021 06:06:58 -0400 Received: from mga18.intel.com ([134.134.136.126]:56829 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235105AbhHCKFs (ORCPT ); Tue, 3 Aug 2021 06:05:48 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10064"; a="200836081" X-IronPort-AV: E=Sophos;i="5.84,291,1620716400"; d="asc'?scan'208";a="200836081" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Aug 2021 03:05:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,291,1620716400"; d="asc'?scan'208";a="441111523" Received: from zhen-hp.sh.intel.com (HELO zhen-hp) ([10.239.160.143]) by fmsmga007.fm.intel.com with ESMTP; 03 Aug 2021 03:05:21 -0700 Date: Tue, 3 Aug 2021 17:43:15 +0800 From: Zhenyu Wang To: Christoph Hellwig Cc: Jason Gunthorpe , "dri-devel@lists.freedesktop.org" , Greg KH , "intel-gfx@lists.freedesktop.org" , Joonas Lahtinen , "linux-kernel@vger.kernel.org" , Jani Nikula , Zhenyu Wang , Gerd Hoffmann , "Vivi, Rodrigo" , "intel-gvt-dev@lists.freedesktop.org" , "Wang, Zhi A" Subject: Re: refactor the i915 GVT support Message-ID: <20210803094315.GF13928@zhen-hp.sh.intel.com> Reply-To: Zhenyu Wang References: <20210721155355.173183-1-hch@lst.de> <20210722112636.wj277vqhg4dez5ug@sirius.home.kraxel.org> <20210727121224.GA2145868@nvidia.com> <20210728175925.GU1721383@nvidia.com> <20210729072022.GB31896@lst.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tfmLD+Hxjexp/STe" Content-Disposition: inline In-Reply-To: <20210729072022.GB31896@lst.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --tfmLD+Hxjexp/STe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2021.07.29 09:20:22 +0200, Christoph Hellwig wrote: > On Wed, Jul 28, 2021 at 02:59:25PM -0300, Jason Gunthorpe wrote: > > On Wed, Jul 28, 2021 at 01:38:58PM +0000, Wang, Zhi A wrote: > >=20 > > > I guess those APIs you were talking about are KVM-only. For other > > > hypervisors, e.g. Xen, ARCN cannot use the APIs you mentioned. Not > > > sure if you have already noticed that VFIO is KVM-only right now. > >=20 > > There is very little hard connection between VFIO and KVM, so no, I > > don't think that is completely true. >=20 > The only connection is the SET_KVM notifier as far as I can tell. > Which is used by a total of two drivers, including i915/gvt. That > being said gvt does not only use vfio, but also does quite a few > direct cals to KVM. yeah, we mostly combined VFIO into hypervisor specific thing before, e.g interface to set vgpu edid, etc. along with kvm specific calls. >=20 > > In an event, an in-tree version of other hypervisor support for GVT > > needs to go through enabling VFIO support so that the existing API > > multiplexers we have can be used properly, not adding a shim layer > > trying to recreate VFIO inside a GPU driver. >=20 > Yes. And if we go back to actually looking at the series a lot of > it just removes entirely pointless indirect calls that go to generic > code and not even the kvm code, or questionable data structure designs. > If we were to support another upstream hypervisor we'd just need to > union a few fields in struct intel_gpu and maybe introduce a few > methods. Preferably in a way that avoids expensive indirect calls > in the fast path. ok, agree on that. Acked-by: Zhenyu Wang Thanks a lot for this effort! --tfmLD+Hxjexp/STe Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQTXuabgHDW6LPt9CICxBBozTXgYJwUCYQkPqQAKCRCxBBozTXgY J28fAKCfkK2e0YsTNF5bkYm4ywfcUrVyUwCfTp2OmZlILsmRQlQHqq/BzcFaawY= =TyW6 -----END PGP SIGNATURE----- --tfmLD+Hxjexp/STe--