[Intel-gfx] [Xen-devel] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-12 Thread Daniel Vetter
On Fri, Jul 11, 2014 at 08:30:59PM +, Tian, Kevin wrote: > > From: Konrad Rzeszutek Wilk [mailto:konrad.wilk at oracle.com] > > Sent: Friday, July 11, 2014 12:42 PM > > > > On Fri, Jul 11, 2014 at 08:29:56AM +0200, Daniel Vetter wrote: > > > On Thu, Jul 10, 2014 at 09:08:24PM +, Tian,

[Xen-devel] [Intel-gfx] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-11 Thread Tian, Kevin
> From: Konrad Rzeszutek Wilk [mailto:konrad.wilk at oracle.com] > Sent: Friday, July 11, 2014 12:42 PM > > On Fri, Jul 11, 2014 at 08:29:56AM +0200, Daniel Vetter wrote: > > On Thu, Jul 10, 2014 at 09:08:24PM +, Tian, Kevin wrote: > > > actually I'm curious whether it's still necessary to

[Xen-devel] [Intel-gfx] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-11 Thread Konrad Rzeszutek Wilk
On Fri, Jul 11, 2014 at 08:29:56AM +0200, Daniel Vetter wrote: > On Thu, Jul 10, 2014 at 09:08:24PM +, Tian, Kevin wrote: > > actually I'm curious whether it's still necessary to __detect__ PCH. Could > > we assume a 1:1 mapping between GPU and PCH, e.g. BDW already hard > > code the

[Intel-gfx] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-11 Thread Daniel Vetter
On Thu, Jul 10, 2014 at 09:08:24PM +, Tian, Kevin wrote: > actually I'm curious whether it's still necessary to __detect__ PCH. Could > we assume a 1:1 mapping between GPU and PCH, e.g. BDW already hard > code the knowledge: > > } else if (IS_BROADWELL(dev)) { >

[Intel-gfx] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-10 Thread Tian, Kevin
> From: Daniel Vetter > Sent: Monday, July 07, 2014 11:40 AM > > On Mon, Jul 07, 2014 at 07:58:30PM +0200, Paolo Bonzini wrote: > > Il 07/07/2014 19:54, Daniel Vetter ha scritto: > > >On Mon, Jul 07, 2014 at 04:57:45PM +0200, Paolo Bonzini wrote: > > >>Il 07/07/2014 16:49, Daniel Vetter ha

[Intel-gfx] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-07 Thread Daniel Vetter
On Mon, Jul 07, 2014 at 07:58:30PM +0200, Paolo Bonzini wrote: > Il 07/07/2014 19:54, Daniel Vetter ha scritto: > >On Mon, Jul 07, 2014 at 04:57:45PM +0200, Paolo Bonzini wrote: > >>Il 07/07/2014 16:49, Daniel Vetter ha scritto: > >>>So the correct fix to forward intel gpus to guests is indeed to

[Intel-gfx] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-07 Thread Paolo Bonzini
Il 07/07/2014 19:54, Daniel Vetter ha scritto: > On Mon, Jul 07, 2014 at 04:57:45PM +0200, Paolo Bonzini wrote: >> Il 07/07/2014 16:49, Daniel Vetter ha scritto: >>> So the correct fix to forward intel gpus to guests is indeed to somehow >>> fake the pch pci ids since the driver really needs them.

[Intel-gfx] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-07 Thread Daniel Vetter
On Mon, Jul 07, 2014 at 04:57:45PM +0200, Paolo Bonzini wrote: > Il 07/07/2014 16:49, Daniel Vetter ha scritto: > >So the correct fix to forward intel gpus to guests is indeed to somehow > >fake the pch pci ids since the driver really needs them. Gross design, but > >that's how the hardware works.

[RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-07 Thread Paolo Bonzini
Il 07/07/2014 16:49, Daniel Vetter ha scritto: > So the correct fix to forward intel gpus to guests is indeed to somehow > fake the pch pci ids since the driver really needs them. Gross design, but > that's how the hardware works. A way that could work for virtualization is this: if you find the

[Intel-gfx] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-07 Thread Daniel Vetter
On Wed, Jun 25, 2014 at 10:28:21AM +0800, Chen, Tiejun wrote: > On 2014/6/24 10:59, Zhenyu Wang wrote: > >On 2014.06.19 17:53:51 +0800, Tiejun Chen wrote: > >>Originally the reason to probe ISA bridge instead of Dev31:Fun0 > >>is to make graphics device passthrough work easy for VMM, that > >>only

[RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-07 Thread Daniel Vetter
On Wed, Jun 25, 2014 at 08:48:32AM +0200, Paolo Bonzini wrote: > It is only slightly better, but the right solution is to fix the driver. > There is absolutely zero reason why a graphics driver should know about the > vendor/device ids of the PCH. There is a very valid reason to know about the

[RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-02 Thread Chen, Tiejun
On 2014/7/2 14:21, Michael S. Tsirkin wrote: > On Thu, Jun 19, 2014 at 05:53:51PM +0800, Tiejun Chen wrote: >> Originally the reason to probe ISA bridge instead of Dev31:Fun0 >> is to make graphics device passthrough work easy for VMM, that >> only need to expose ISA bridge to let driver know the

[RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-02 Thread Michael S. Tsirkin
On Thu, Jun 19, 2014 at 05:53:51PM +0800, Tiejun Chen wrote: > Originally the reason to probe ISA bridge instead of Dev31:Fun0 > is to make graphics device passthrough work easy for VMM, that > only need to expose ISA bridge to let driver know the real > hardware underneath. This is a requirement

[RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-01 Thread Chen, Tiejun
On 2014/6/30 19:18, Michael S. Tsirkin wrote: > On Thu, Jun 19, 2014 at 05:53:51PM +0800, Tiejun Chen wrote: >> Originally the reason to probe ISA bridge instead of Dev31:Fun0 >> is to make graphics device passthrough work easy for VMM, that >> only need to expose ISA bridge to let driver know the

[RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-30 Thread Michael S. Tsirkin
On Thu, Jun 19, 2014 at 05:53:51PM +0800, Tiejun Chen wrote: > Originally the reason to probe ISA bridge instead of Dev31:Fun0 > is to make graphics device passthrough work easy for VMM, that > only need to expose ISA bridge to let driver know the real > hardware underneath. This is a requirement

[RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-30 Thread Paolo Bonzini
Il 30/06/2014 05:13, Chen, Tiejun ha scritto: > After I discuss internal, we think even we just set the real > vendor/device ids to this ISA bridge at 00:1f.0, guest firmware should > still work well with these pair of real vendor/device ids. > > So if you think something would conflict or be

[RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-30 Thread Chen, Tiejun
On 2014/6/25 15:55, Paolo Bonzini wrote: > Il 25/06/2014 09:34, Chen, Tiejun ha scritto: >> On 2014/6/25 14:48, Paolo Bonzini wrote: >>> Second problem. Your IGD passthrough code currently works with QEMU's >>> PIIX4-based machine. But what happens if you try to extend it, so that >> >> Yes,

[RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-25 Thread Chen, Tiejun
On 2014/6/25 14:48, Paolo Bonzini wrote: > Il 22/06/2014 10:25, Chen, Tiejun ha scritto: >> In qemu-upstream, as you commented we can't create this as a ISA class >> type explicitly. > > Note I didn't say that QEMU doesn't like having two ISA bridges. > > I commented that the firmware will see two

[Intel-gfx] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-25 Thread Chen, Tiejun
On 2014/6/24 10:59, Zhenyu Wang wrote: > On 2014.06.19 17:53:51 +0800, Tiejun Chen wrote: >> Originally the reason to probe ISA bridge instead of Dev31:Fun0 >> is to make graphics device passthrough work easy for VMM, that >> only need to expose ISA bridge to let driver know the real >> hardware

[RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-25 Thread Paolo Bonzini
Il 25/06/2014 09:34, Chen, Tiejun ha scritto: > On 2014/6/25 14:48, Paolo Bonzini wrote: >> Second problem. Your IGD passthrough code currently works with QEMU's >> PIIX4-based machine. But what happens if you try to extend it, so that > > Yes, current xen machine, xenpv, is based on pii4, and

[RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-25 Thread Paolo Bonzini
Il 22/06/2014 10:25, Chen, Tiejun ha scritto: > In qemu-upstream, as you commented we can't create this as a ISA class > type explicitly. Note I didn't say that QEMU doesn't like having two ISA bridges. I commented that the firmware will see two ISA bridges and will try to initialize both of

[Intel-gfx] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-24 Thread Zhenyu Wang
On 2014.06.19 17:53:51 +0800, Tiejun Chen wrote: > Originally the reason to probe ISA bridge instead of Dev31:Fun0 > is to make graphics device passthrough work easy for VMM, that > only need to expose ISA bridge to let driver know the real > hardware underneath. This is a requirement from

[RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-22 Thread Chen, Tiejun
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

[RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-22 Thread Chen, Tiejun
On 2014/6/20 20:32, Daniel Vetter wrote: > Well I have no clue about forwarding the intel gpu to virtualized > hosts and also no idea who could review this really. There's been a > bit a discussion around the iommu mapping forwarding and similar No, this doesn't affect IOMMU mapping. > topics

[RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-20 Thread Chen, Tiejun
Just ping, any comments? Thanks Tiejun On 2014/6/19 17:53, Tiejun Chen wrote: > Originally the reason to probe ISA bridge instead of Dev31:Fun0 > is to make graphics device passthrough work easy for VMM, that > only need to expose ISA bridge to let driver know the real > hardware underneath.

[RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-20 Thread Paolo Bonzini
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

[RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-20 Thread Daniel Vetter
Well I have no clue about forwarding the intel gpu to virtualized hosts and also no idea who could review this really. There's been a bit a discussion around the iommu mapping forwarding and similar topics though. So I really wonder how well our driver works in this use case ... -Daniel On Fri,

[RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-19 Thread Tiejun Chen
Originally the reason to probe ISA bridge instead of Dev31:Fun0 is to make graphics device passthrough work easy for VMM, that only need to expose ISA bridge to let driver know the real hardware underneath. This is a requirement from virtualization team. Especially in that virtualized