Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-14 Thread Takashi Iwai
On Sun, 14 Jun 2020 14:07:48 +0200, Alex Xu (Hello71) wrote: > > Excerpts from Takashi Iwai's message of June 14, 2020 5:54 am: > > On Sat, 13 Jun 2020 18:25:22 +0200, > > Alex Xu (Hello71) wrote: > >> > >> Excerpts from Takashi Iwai's message of June 11, 2020 1:11 pm: > >> > Thanks, so something

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-14 Thread Alex Xu (Hello71)
Excerpts from Takashi Iwai's message of June 14, 2020 5:54 am: > On Sat, 13 Jun 2020 18:25:22 +0200, > Alex Xu (Hello71) wrote: >> >> Excerpts from Takashi Iwai's message of June 11, 2020 1:11 pm: >> > Thanks, so something still missing in the mmap handling, I guess. >> > >> > I've worked on two

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-14 Thread Takashi Iwai
On Sat, 13 Jun 2020 18:25:22 +0200, Alex Xu (Hello71) wrote: > > Excerpts from Takashi Iwai's message of June 11, 2020 1:11 pm: > > Thanks, so something still missing in the mmap handling, I guess. > > > > I've worked on two different branches for potential fixes of your > > problems. Could you

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-13 Thread Alex Xu (Hello71)
Excerpts from Takashi Iwai's message of June 11, 2020 1:11 pm: > Thanks, so something still missing in the mmap handling, I guess. > > I've worked on two different branches for potential fixes of your > problems. Could you test topic/dma-fix and topic/dma-fix2 branches? > git://git.kernel.org/p

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-11 Thread Takashi Iwai
On Thu, 11 Jun 2020 16:51:55 +0200, Alex Xu (Hello71) wrote: > > Excerpts from Takashi Iwai's message of June 9, 2020 11:12 am: > > On Tue, 09 Jun 2020 13:47:33 +0200, > > Christoph Hellwig wrote: > >> > >> Alex, can you try this patch? > > > > Also could you check whether just papering over the

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-11 Thread Alex Xu (Hello71)
Excerpts from Takashi Iwai's message of June 9, 2020 11:12 am: > On Tue, 09 Jun 2020 13:47:33 +0200, > Christoph Hellwig wrote: >> >> Alex, can you try this patch? > > Also could you check whether just papering over the memset() call > alone avoids the crash like below? For PulseAudio and dmix/d

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-11 Thread Alex Xu (Hello71)
Excerpts from Christoph Hellwig's message of June 9, 2020 7:47 am: > Alex, can you try this patch? > > diff --git a/sound/core/Kconfig b/sound/core/Kconfig > index d4554f376160a9..10b06e575a7fc5 100644 > --- a/sound/core/Kconfig > +++ b/sound/core/Kconfig > @@ -192,6 +192,6 @@ config SND_VMASTER >

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-10 Thread Christoph Hellwig
On Tue, Jun 09, 2020 at 10:26:45PM -0700, David Rientjes wrote: > If this option should not implicitly be set for DMA_COHERENT_POOL, then I > assume we need yet another Kconfig option since DMA_REMAP selected it > before and DMA_COHERENT_POOL selects DMA_REMAP :) Yes, but what do we actually nee

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-09 Thread David Rientjes
On Tue, 9 Jun 2020, Christoph Hellwig wrote: > > Working theory is that CONFIG_DMA_NONCOHERENT_MMAP getting set is causing > > the error_code in the page fault path. Debugging with Alex off-thread we > > found that dma_{alloc,free}_from_pool() are not getting called from the > > new code in dm

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-09 Thread Takashi Iwai
On Tue, 09 Jun 2020 13:47:33 +0200, Christoph Hellwig wrote: > > Alex, can you try this patch? Also could you check whether just papering over the memset() call alone avoids the crash like below? For PulseAudio and dmix/dsnoop, it's the only code path that accesses the vmapped buffer, I believe.

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-09 Thread Jaroslav Kysela
Dne 09. 06. 20 v 13:49 Christoph Hellwig napsal(a): On Tue, Jun 09, 2020 at 01:45:34PM +0200, Takashi Iwai wrote: Yes, for the sound stuff, something below should make things working. But it means that we'll lose the SG-buffer allocation and the allocation of large buffers might fail on some mac

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-09 Thread Christoph Hellwig
On Tue, Jun 09, 2020 at 01:45:34PM +0200, Takashi Iwai wrote: > Yes, for the sound stuff, something below should make things working. > But it means that we'll lose the SG-buffer allocation and the > allocation of large buffers might fail on some machines. We crossed lines there. In general due t

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-09 Thread Christoph Hellwig
Alex, can you try this patch? diff --git a/sound/core/Kconfig b/sound/core/Kconfig index d4554f376160a9..10b06e575a7fc5 100644 --- a/sound/core/Kconfig +++ b/sound/core/Kconfig @@ -192,6 +192,6 @@ config SND_VMASTER config SND_DMA_SGBUF def_bool y - depends on X86 + depends

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-09 Thread Takashi Iwai
On Tue, 09 Jun 2020 13:40:59 +0200, Christoph Hellwig wrote: > > On Tue, Jun 09, 2020 at 01:38:46PM +0200, Takashi Iwai wrote: > > On Tue, 09 Jun 2020 13:31:23 +0200, > > Christoph Hellwig wrote: > > > > > > On Tue, Jun 09, 2020 at 11:31:20AM +0200, Takashi Iwai wrote: > > > > > > How would be a

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-09 Thread Christoph Hellwig
On Tue, Jun 09, 2020 at 01:38:46PM +0200, Takashi Iwai wrote: > On Tue, 09 Jun 2020 13:31:23 +0200, > Christoph Hellwig wrote: > > > > On Tue, Jun 09, 2020 at 11:31:20AM +0200, Takashi Iwai wrote: > > > > > How would be a proper way to get the virtually mapped SG-buffer pages > > > > > with cohere

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-09 Thread Takashi Iwai
On Tue, 09 Jun 2020 13:31:23 +0200, Christoph Hellwig wrote: > > On Tue, Jun 09, 2020 at 11:31:20AM +0200, Takashi Iwai wrote: > > > > How would be a proper way to get the virtually mapped SG-buffer pages > > > > with coherent memory? (Also allowing user-space mmap, too) > > > > > > dma_mmap_coh

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-09 Thread Christoph Hellwig
On Tue, Jun 09, 2020 at 11:31:20AM +0200, Takashi Iwai wrote: > > > How would be a proper way to get the virtually mapped SG-buffer pages > > > with coherent memory? (Also allowing user-space mmap, too) > > > > dma_mmap_coherent / dma_mmap_attrs for userspace. We don't really > > have a good way

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-09 Thread Takashi Iwai
On Tue, 09 Jun 2020 11:31:20 +0200, Takashi Iwai wrote: > > On Tue, 09 Jun 2020 11:17:27 +0200, > Christoph Hellwig wrote: > > > > On Tue, Jun 09, 2020 at 11:09:14AM +0200, Takashi Iwai wrote: > > > On Tue, 09 Jun 2020 10:43:05 +0200, > > > Christoph Hellwig wrote: > > > > > > > > On Tue, Jun 09

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-09 Thread Takashi Iwai
On Tue, 09 Jun 2020 11:17:27 +0200, Christoph Hellwig wrote: > > On Tue, Jun 09, 2020 at 11:09:14AM +0200, Takashi Iwai wrote: > > On Tue, 09 Jun 2020 10:43:05 +0200, > > Christoph Hellwig wrote: > > > > > > On Tue, Jun 09, 2020 at 10:05:26AM +0200, Takashi Iwai wrote: > > > > > >From the disasse

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-09 Thread Christoph Hellwig
On Tue, Jun 09, 2020 at 11:09:14AM +0200, Takashi Iwai wrote: > On Tue, 09 Jun 2020 10:43:05 +0200, > Christoph Hellwig wrote: > > > > On Tue, Jun 09, 2020 at 10:05:26AM +0200, Takashi Iwai wrote: > > > > >From the disassembly it seems like a vmalloc allocation is NULL, which > > > > seems really

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-09 Thread Takashi Iwai
On Tue, 09 Jun 2020 10:43:05 +0200, Christoph Hellwig wrote: > > On Tue, Jun 09, 2020 at 10:05:26AM +0200, Takashi Iwai wrote: > > > >From the disassembly it seems like a vmalloc allocation is NULL, which > > > seems really weird as this patch shouldn't make a difference for them, > > > and I also

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-09 Thread Christoph Hellwig
On Tue, Jun 09, 2020 at 10:05:26AM +0200, Takashi Iwai wrote: > > >From the disassembly it seems like a vmalloc allocation is NULL, which > > seems really weird as this patch shouldn't make a difference for them, > > and I also only see a single places that allocates the field, and that > > checks

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-09 Thread Takashi Iwai
On Tue, 09 Jun 2020 07:43:06 +0200, Christoph Hellwig wrote: > > On Mon, Jun 08, 2020 at 07:31:47PM -0700, David Rientjes wrote: > > On Mon, 8 Jun 2020, Alex Xu (Hello71) wrote: > > > > > Excerpts from Christoph Hellwig's message of June 8, 2020 2:19 am: > > > > Can you do a listing using gdb whe

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-08 Thread Christoph Hellwig
On Mon, Jun 08, 2020 at 07:31:47PM -0700, David Rientjes wrote: > On Mon, 8 Jun 2020, Alex Xu (Hello71) wrote: > > > Excerpts from Christoph Hellwig's message of June 8, 2020 2:19 am: > > > Can you do a listing using gdb where this happens? > > > > > > gdb vmlinux > > > > > > l *(snd_pcm_hw_para

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-08 Thread David Rientjes
On Mon, 8 Jun 2020, Alex Xu (Hello71) wrote: > Excerpts from Christoph Hellwig's message of June 8, 2020 2:19 am: > > Can you do a listing using gdb where this happens? > > > > gdb vmlinux > > > > l *(snd_pcm_hw_params+0x3f3) > > > > ? > > > > (gdb) l *(snd_pcm_hw_params+0x3f3) > 0x81

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-08 Thread Alex Xu (Hello71)
Excerpts from Christoph Hellwig's message of June 8, 2020 2:19 am: > Can you do a listing using gdb where this happens? > > gdb vmlinux > > l *(snd_pcm_hw_params+0x3f3) > > ? > (gdb) l *(snd_pcm_hw_params+0x3f3) 0x817efc85 is in snd_pcm_hw_params (.../linux/sound/core/pcm_native.c:749

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-07 Thread Christoph Hellwig
Can you do a listing using gdb where this happens? gdb vmlinux l *(snd_pcm_hw_params+0x3f3) ? On Sun, Jun 07, 2020 at 11:58:21AM -0400, Alex Xu (Hello71) wrote: > I have a similar issue, caused between aaa2faab4ed8 and b170290c2836. > > [ 20.263098] BUG: unable to handle page fault for addre

Re: 82fef0ad811f "x86/mm: unencrypted non-blocking DMA allocations use coherent pools" was Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-07 Thread Alex Xu (Hello71)
Excerpts from David Rientjes's message of June 7, 2020 8:57 pm: > Thanks for trying it out, Alex. Would you mind sending your .config and > command line? I assume either mem_encrypt=on or > CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT is enabled. > > Could you also give this a try? > > diff --git

Re: 82fef0ad811f "x86/mm: unencrypted non-blocking DMA allocations use coherent pools" was Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-07 Thread David Rientjes
On Sun, 7 Jun 2020, Alex Xu (Hello71) wrote: > > On Sun, 7 Jun 2020, Pavel Machek wrote: > > > >> > I have a similar issue, caused between aaa2faab4ed8 and b170290c2836. > >> > > >> > [ 20.263098] BUG: unable to handle page fault for address: > >> > b2b582cc2000 > >> > [ 20.263104] #PF:

Re: 82fef0ad811f "x86/mm: unencrypted non-blocking DMA allocations use coherent pools" was Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-07 Thread Alex Xu (Hello71)
Excerpts from David Rientjes's message of June 7, 2020 3:41 pm: > On Sun, 7 Jun 2020, Pavel Machek wrote: > >> > I have a similar issue, caused between aaa2faab4ed8 and b170290c2836. >> > >> > [ 20.263098] BUG: unable to handle page fault for address: >> > b2b582cc2000 >> > [ 20.263104]

Re: 82fef0ad811f "x86/mm: unencrypted non-blocking DMA allocations use coherent pools" was Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-07 Thread David Rientjes
On Sun, 7 Jun 2020, Pavel Machek wrote: > > I have a similar issue, caused between aaa2faab4ed8 and b170290c2836. > > > > [ 20.263098] BUG: unable to handle page fault for address: > > b2b582cc2000 > > [ 20.263104] #PF: supervisor write access in kernel mode > > [ 20.263105] #PF: error

82fef0ad811f "x86/mm: unencrypted non-blocking DMA allocations use coherent pools" was Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-07 Thread Pavel Machek
Hi! > I have a similar issue, caused between aaa2faab4ed8 and b170290c2836. > > [ 20.263098] BUG: unable to handle page fault for address: b2b582cc2000 > [ 20.263104] #PF: supervisor write access in kernel mode > [ 20.263105] #PF: error_code(0x000b) - reserved bit violation > [ 20.263

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-06-07 Thread Alex Xu (Hello71)
I have a similar issue, caused between aaa2faab4ed8 and b170290c2836. [ 20.263098] BUG: unable to handle page fault for address: b2b582cc2000 [ 20.263104] #PF: supervisor write access in kernel mode [ 20.263105] #PF: error_code(0x000b) - reserved bit violation [ 20.263107] PGD 3fd03b06

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-05-21 Thread Pavel Machek
Hi! > My window manager stopped responding. I was able to recover machine > using sysrq-k. > > I started writing nice report, when session failed second time. And > then third time on next attempt. > > Any ideas? > > I'll send this out before this locks up... Today it crashed again, with simil

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-05-20 Thread Takashi Iwai
On Wed, 20 May 2020 13:39:06 +0200, Pavel Machek wrote: > > On Wed 2020-05-20 13:37:02, Takashi Iwai wrote: > > On Wed, 20 May 2020 13:11:37 +0200, > > Pavel Machek wrote: > > > > > > Hi! > > > > > > My window manager stopped responding. I was able to recover machine > > > using sysrq-k. > > >

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-05-20 Thread Pavel Machek
On Wed 2020-05-20 13:37:02, Takashi Iwai wrote: > On Wed, 20 May 2020 13:11:37 +0200, > Pavel Machek wrote: > > > > Hi! > > > > My window manager stopped responding. I was able to recover machine > > using sysrq-k. > > > > I started writing nice report, when session failed second time. And > > t

Re: next-0519 on thinkpad x60: sound related? window manager crash

2020-05-20 Thread Takashi Iwai
On Wed, 20 May 2020 13:11:37 +0200, Pavel Machek wrote: > > Hi! > > My window manager stopped responding. I was able to recover machine > using sysrq-k. > > I started writing nice report, when session failed second time. And > then third time on next attempt. > > Any ideas? Do you know when th

next-0519 on thinkpad x60: sound related? window manager crash

2020-05-20 Thread Pavel Machek
Hi! My window manager stopped responding. I was able to recover machine using sysrq-k. I started writing nice report, when session failed second time. And then third time on next attempt. Any ideas? I'll send this out before this locks up... Best regards,