From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4579CC433F5 for ; Wed, 6 Oct 2021 13:29:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DE44261075 for ; Wed, 6 Oct 2021 13:29:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DE44261075 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=alien8.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 82AF96E49F; Wed, 6 Oct 2021 13:29:23 +0000 (UTC) Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1CF606E52E for ; Wed, 6 Oct 2021 09:42:19 +0000 (UTC) Received: from zn.tnic (p200300ec2f0d3600b8444335b766c15f.dip0.t-ipconnect.de [IPv6:2003:ec:2f0d:3600:b844:4335:b766:c15f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id E9C511EC0390; Wed, 6 Oct 2021 11:42:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1633513337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=JKschoGOfSrt9RWijP/dk9HNvjRwYLO9J34qvRJjSWk=; b=bu4OkrIp7BBVQZFxdiS0wDK3iF/wGLEpGlbXaOG97x54XWGp6GJtB1lHIIbxcb7gFoGnu4 cPtnsJAAoXOoAtRbSbkbjEcTmyxQn20s/axIldCSBoIAk2GUzPTOLd4vvLenZ8mZsBnyXj KKGfblj+Y8d1R8yja1WwyHF1eR1wHQg= Date: Wed, 6 Oct 2021 11:42:08 +0200 From: Borislav Petkov To: Alex Deucher Cc: Paul Menzel , Tom Lendacky , Thomas Gleixner , Ingo Molnar , X86 ML , Dave Hansen , Andy Lutomirski , Peter Zijlstra , LKML , amd-gfx list Subject: Re: `AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT=y` causes AMDGPU to fail on Ryzen: amdgpu: SME is not compatible with RAVEN Message-ID: References: <8bbacd0e-4580-3194-19d2-a0ecad7df09c@molgen.mpg.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Mailman-Approved-At: Wed, 06 Oct 2021 13:29:22 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" On Tue, Oct 05, 2021 at 10:48:15AM -0400, Alex Deucher wrote: > It's not incompatible per se, but SEM requires the IOMMU be enabled > because the C bit used for encryption is beyond the dma_mask of most > devices. If the C bit is not set, the en/decryption for DMA doesn't > occur. So you need IOMMU to be enabled in remapping mode to use SME > with most devices. Raven has further requirements in that it requires > IOMMUv2 functionality to support some features which currently uses a > direct mapping in the IOMMU and hence the C bit is not properly > handled. So lemme ask you this: do Raven-containing systems exist out there which don't have IOMMUv2 functionality and which can cause boot failures when SME is enabled in the kernel .config? IOW, can we handle this at boot time properly, i.e., disable SME if we detect Raven or IOMMUv2 support is missing? If not, then we really will have to change the default. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette