Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-10-09 Thread Joerg Roedel
On Tue, Oct 06, 2015 at 09:13:11PM +0800, Jiang Liu wrote: > We are on leave for Chinese National Holiday and has limited > access to my working environment. It would be appreciated if you could > help to send out a patch for it. Otherwise I will send out a patch > within 2-3 days. Okay, I

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-10-09 Thread Joerg Roedel
On Tue, Oct 06, 2015 at 09:13:11PM +0800, Jiang Liu wrote: > We are on leave for Chinese National Holiday and has limited > access to my working environment. It would be appreciated if you could > help to send out a patch for it. Otherwise I will send out a patch > within 2-3 days. Okay, I

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-10-06 Thread Jiang Liu
On 2015/10/5 18:03, Joerg Roedel wrote: > Hi Jiang, > > On Sat, Oct 03, 2015 at 03:36:35PM +0800, Jiang Liu wrote: >> So to summary, I think we only need following change to fix the >> regression: >> int pcibios_alloc_irq(struct pci_dev *dev) >> { >> +if (pci_dev_msi_enabled(dev)) >> +

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-10-06 Thread Jiang Liu
On 2015/10/5 18:03, Joerg Roedel wrote: > Hi Jiang, > > On Sat, Oct 03, 2015 at 03:36:35PM +0800, Jiang Liu wrote: >> So to summary, I think we only need following change to fix the >> regression: >> int pcibios_alloc_irq(struct pci_dev *dev) >> { >> +if (pci_dev_msi_enabled(dev)) >> +

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-10-05 Thread Joerg Roedel
Hi Jiang, On Sat, Oct 03, 2015 at 03:36:35PM +0800, Jiang Liu wrote: > So to summary, I think we only need following change to fix the > regression: > int pcibios_alloc_irq(struct pci_dev *dev) > { > + if (pci_dev_msi_enabled(dev)) > + return -EBUSY; > > What do you think?

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-10-05 Thread Joerg Roedel
Hi Jiang, On Sat, Oct 03, 2015 at 03:36:35PM +0800, Jiang Liu wrote: > So to summary, I think we only need following change to fix the > regression: > int pcibios_alloc_irq(struct pci_dev *dev) > { > + if (pci_dev_msi_enabled(dev)) > + return -EBUSY; > > What do you think?

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-10-03 Thread Borislav Petkov
On Sat, Oct 03, 2015 at 03:36:35PM +0800, Jiang Liu wrote: > The above change is not needed, pcibios_disable_irq() will > first check !pci_has_managed_irq(dev) before actually freeing > PCI irq. pci_has_managed_irq(dev) only returns true if > pcibios_alloc_irq() succeeds. > > So to summary, I

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-10-03 Thread Jiang Liu
On 2015/10/1 1:36, Borislav Petkov wrote: > On Thu, Oct 01, 2015 at 01:00:44AM +0800, Jiang Liu wrote: >> Thanks Joerg, that makes sense. If some driver tries to binding to >> the IOMMU device, it will trigger the scenario as you described. For >> example, Xen backend driver will try to probe

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-10-03 Thread Borislav Petkov
On Sat, Oct 03, 2015 at 03:36:35PM +0800, Jiang Liu wrote: > The above change is not needed, pcibios_disable_irq() will > first check !pci_has_managed_irq(dev) before actually freeing > PCI irq. pci_has_managed_irq(dev) only returns true if > pcibios_alloc_irq() succeeds. > > So to summary, I

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-10-03 Thread Jiang Liu
On 2015/10/1 1:36, Borislav Petkov wrote: > On Thu, Oct 01, 2015 at 01:00:44AM +0800, Jiang Liu wrote: >> Thanks Joerg, that makes sense. If some driver tries to binding to >> the IOMMU device, it will trigger the scenario as you described. For >> example, Xen backend driver will try to probe

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-09-30 Thread Joerg Roedel
On Wed, Sep 30, 2015 at 07:36:19PM +0200, Borislav Petkov wrote: > Right, so this fixes the issue on my box, courtesy of Joerg. WE > basically don't disable the IRQ on MSI-enabled devices. The AMD IOMMU > uses a barebones PCI device but not a PCI driver, which would be an > overkill. Well, not

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-09-30 Thread Joerg Roedel
On Thu, Oct 01, 2015 at 01:00:44AM +0800, Jiang Liu wrote: > Thanks Joerg, that makes sense. If some driver tries to binding to the > IOMMU device, it will trigger the scenario as you described. For > example, Xen backend driver will try to probe all PCI devices > if enabled. I will do more

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-09-30 Thread Borislav Petkov
On Thu, Oct 01, 2015 at 01:00:44AM +0800, Jiang Liu wrote: > Thanks Joerg, that makes sense. If some driver tries to binding to > the IOMMU device, it will trigger the scenario as you described. For > example, Xen backend driver will try to probe all PCI devices if > enabled. I will do more

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-09-30 Thread Jiang Liu
On 2015/9/30 20:44, Joerg Roedel wrote: > On Wed, Sep 30, 2015 at 03:45:39PM +0800, Jiang Liu wrote: >> So we need to figure out why we got irq number 0 after enabling >> MSI for AMD IOMMU device. The only hint I got is that iommu driver just >> grabbing the PCI device without providing a PCI

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-09-30 Thread Joerg Roedel
On Wed, Sep 30, 2015 at 03:45:39PM +0800, Jiang Liu wrote: > So we need to figure out why we got irq number 0 after enabling > MSI for AMD IOMMU device. The only hint I got is that iommu driver just > grabbing the PCI device without providing a PCI device driver for IOMMU > PCI device, we have

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-09-30 Thread Jiang Liu
n 2015/9/29 18:51, Borislav Petkov wrote: > On Tue, Sep 29, 2015 at 04:50:36PM +0800, Jiang Liu wrote: >> So could you please help to apply the attached debug patch to gather >> more information about the regression? > > Sure, just did. > > I'm sending you a full s/r cycle attempt caught over

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-09-30 Thread Borislav Petkov
On Thu, Oct 01, 2015 at 01:00:44AM +0800, Jiang Liu wrote: > Thanks Joerg, that makes sense. If some driver tries to binding to > the IOMMU device, it will trigger the scenario as you described. For > example, Xen backend driver will try to probe all PCI devices if > enabled. I will do more

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-09-30 Thread Joerg Roedel
On Thu, Oct 01, 2015 at 01:00:44AM +0800, Jiang Liu wrote: > Thanks Joerg, that makes sense. If some driver tries to binding to the > IOMMU device, it will trigger the scenario as you described. For > example, Xen backend driver will try to probe all PCI devices > if enabled. I will do more

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-09-30 Thread Joerg Roedel
On Wed, Sep 30, 2015 at 07:36:19PM +0200, Borislav Petkov wrote: > Right, so this fixes the issue on my box, courtesy of Joerg. WE > basically don't disable the IRQ on MSI-enabled devices. The AMD IOMMU > uses a barebones PCI device but not a PCI driver, which would be an > overkill. Well, not

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-09-30 Thread Jiang Liu
n 2015/9/29 18:51, Borislav Petkov wrote: > On Tue, Sep 29, 2015 at 04:50:36PM +0800, Jiang Liu wrote: >> So could you please help to apply the attached debug patch to gather >> more information about the regression? > > Sure, just did. > > I'm sending you a full s/r cycle attempt caught over

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-09-30 Thread Joerg Roedel
On Wed, Sep 30, 2015 at 03:45:39PM +0800, Jiang Liu wrote: > So we need to figure out why we got irq number 0 after enabling > MSI for AMD IOMMU device. The only hint I got is that iommu driver just > grabbing the PCI device without providing a PCI device driver for IOMMU > PCI device, we have

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-09-30 Thread Jiang Liu
On 2015/9/30 20:44, Joerg Roedel wrote: > On Wed, Sep 30, 2015 at 03:45:39PM +0800, Jiang Liu wrote: >> So we need to figure out why we got irq number 0 after enabling >> MSI for AMD IOMMU device. The only hint I got is that iommu driver just >> grabbing the PCI device without providing a PCI

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-09-29 Thread Borislav Petkov
On Tue, Sep 29, 2015 at 04:50:36PM +0800, Jiang Liu wrote: > So could you please help to apply the attached debug patch to gather > more information about the regression? Sure, just did. I'm sending you a full s/r cycle attempt caught over serial in a private message. Thanks. --

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-09-29 Thread Jiang Liu
On 2015/9/27 0:46, Borislav Petkov wrote: > On Wed, Sep 23, 2015 at 06:18:39PM +0200, Borislav Petkov wrote: >> On Wed, Sep 23, 2015 at 06:06:21PM +0200, Borislav Petkov wrote: >>> On Wed, Sep 23, 2015 at 04:44:50PM +0200, Daniel Vetter wrote: sorry I sprinkled the locking stuff in the wrong

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-09-29 Thread Borislav Petkov
On Tue, Sep 29, 2015 at 04:50:36PM +0800, Jiang Liu wrote: > So could you please help to apply the attached debug patch to gather > more information about the regression? Sure, just did. I'm sending you a full s/r cycle attempt caught over serial in a private message. Thanks. --

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-09-29 Thread Jiang Liu
On 2015/9/27 0:46, Borislav Petkov wrote: > On Wed, Sep 23, 2015 at 06:18:39PM +0200, Borislav Petkov wrote: >> On Wed, Sep 23, 2015 at 06:06:21PM +0200, Borislav Petkov wrote: >>> On Wed, Sep 23, 2015 at 04:44:50PM +0200, Daniel Vetter wrote: sorry I sprinkled the locking stuff in the wrong

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-09-26 Thread Borislav Petkov
On Wed, Sep 23, 2015 at 06:18:39PM +0200, Borislav Petkov wrote: > On Wed, Sep 23, 2015 at 06:06:21PM +0200, Borislav Petkov wrote: > > On Wed, Sep 23, 2015 at 04:44:50PM +0200, Daniel Vetter wrote: > > > sorry I sprinkled the locking stuff in the wrong places. Still confused > > > why the resume

Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() - evildoer found and neutralized

2015-09-26 Thread Borislav Petkov
On Wed, Sep 23, 2015 at 06:18:39PM +0200, Borislav Petkov wrote: > On Wed, Sep 23, 2015 at 06:06:21PM +0200, Borislav Petkov wrote: > > On Wed, Sep 23, 2015 at 04:44:50PM +0200, Daniel Vetter wrote: > > > sorry I sprinkled the locking stuff in the wrong places. Still confused > > > why the resume