[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1591582140.kcn3hpk42g.none@localhost>
Date: Sun, 07 Jun 2020 22:13:42 -0400
From: "Alex Xu (Hello71)" <alex_y_xu@...oo.ca>
To: David Rientjes <rientjes@...gle.com>
Cc: alsa-devel@...a-project.org, bp@...en8.de, hch@...radead.org,
hch@....de, hpa@...or.com, linux-kernel@...r.kernel.org,
mingo@...hat.com, Pavel Machek <pavel@....cz>, perex@...ex.cz,
tglx@...utronix.de, tiwai@...e.com, x86@...nel.org
Subject: Re: 82fef0ad811f "x86/mm: unencrypted non-blocking DMA allocations
use coherent pools" was Re: next-0519 on thinkpad x60: sound related? window
manager crash
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 a/kernel/dma/direct.c b/kernel/dma/direct.c
> --- a/kernel/dma/direct.c
> +++ b/kernel/dma/direct.c
> @@ -99,10 +99,11 @@ static inline bool dma_should_alloc_from_pool(struct device *dev, gfp_t gfp,
> static inline bool dma_should_free_from_pool(struct device *dev,
> unsigned long attrs)
> {
> - if (IS_ENABLED(CONFIG_DMA_COHERENT_POOL))
> + if (!IS_ENABLED(CONFIG_DMA_COHERENT_POOL))
> + return false;
> + if (force_dma_unencrypted(dev))
> return true;
> - if ((attrs & DMA_ATTR_NO_KERNEL_MAPPING) &&
> - !force_dma_unencrypted(dev))
> + if (attrs & DMA_ATTR_NO_KERNEL_MAPPING)
> return false;
> if (IS_ENABLED(CONFIG_DMA_DIRECT_REMAP))
> return true;
>
This patch doesn't work for me either. It has since occurred to me that
while I do have CONFIG_AMD_MEM_ENCYRPT=y, I have
CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT=n, because it was broken with
amdgpu (unfortunately a downgrade from radeon in this respect). Tried it
again just now and it looks like it's now able to enable KMS, but all it
displays is serious-looking errors.
Sorry for not mentioning that earlier. I'll send you my .config and
command line off-list.
Thanks,
Alex.
Powered by blists - more mailing lists