From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wyd5p-00065v-PU for qemu-devel@nongnu.org; Sun, 22 Jun 2014 04:25:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wyd5j-0007Z5-Fy for qemu-devel@nongnu.org; Sun, 22 Jun 2014 04:25:41 -0400 Received: from mga02.intel.com ([134.134.136.20]:21775) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wyd5j-0007Yo-A8 for qemu-devel@nongnu.org; Sun, 22 Jun 2014 04:25:35 -0400 Message-ID: <53A692F9.3060200@intel.com> Date: Sun, 22 Jun 2014 16:25:29 +0800 From: "Chen, Tiejun" MIME-Version: 1.0 References: <1403171631-3452-1-git-send-email-tiejun.chen@intel.com> <53A42DAA.80406@redhat.com> In-Reply-To: <53A42DAA.80406@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , daniel.vetter@ffwll.ch, jani.nikula@linux.intel.com, airlied@linux.ie Cc: intel-gfx@lists.freedesktop.org, xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, qemu-devel@nongnu.org On 2014/6/20 20:48, Paolo Bonzini wrote: > Il 19/06/2014 11:53, Tiejun Chen ha scritto: >> so this mean that isa bridge is still represented with Dev31:Func0 >> like the native OS. Furthermore, currently we're pushing VGA >> passthrough support into qemu upstream, and with some discussion, >> we wouldn't set the bridge class type and just expose this devfn. > > Even this is not really optimal. It just happens to work just because > QEMU's machine is currently a PCI machine with the ISA bridge on 00:01.0. > > As soon as you'll try doing integrated graphics passthrough on a PCIe > machine type (such as QEMU's "-M q35") things will break down just as > badly. > Sorry, I can't understand why this is related to the ISA bridge, 00:01.0 or even other PCIe machine type. In virtualized case we always need to create this ISA bridge as a devfn, 00:15.0, work for the i915 driver to support IGD passthrough. In qemu-xen-traditional, this ISA bridge is already created as follows: 1> We set this ISA type explicitly; 2> We register that as 00:15.0. In qemu-upstream, as you commented we can't create this as a ISA class type explicitly. So we compromise by faking this ISA bridge without ISA class type setting (as I recall you already said this way is slightly better). Maybe we will figure better way in the future. But anyway, this is always registered as 00:15.0, right? So I think the i915 driver can go back to probe the devfn like the native environment. If I'm wrong please correct me. Thanks Tiejun