Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp184806pxb; Wed, 6 Oct 2021 02:44:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5hGL6+WUvNGqPjF7IMofMq9DURlm5ARWIzcjjn8lEYN0QmjiJD9QnDD0StekHYjt/3hT9 X-Received: by 2002:a17:906:38db:: with SMTP id r27mr30916439ejd.338.1633513473464; Wed, 06 Oct 2021 02:44:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633513473; cv=none; d=google.com; s=arc-20160816; b=pyh2uVLwyhoVW7hn5ReGvszAFf+93B3z+MVzbY/UpAAzyYUO/ntBixkE+h+Hq41Us1 xVn9ZOxTnGxVXHM/tCth5rbCX4xFImhmNlpxZuY7OMjFCRSGJChexnAy5nBmui/sNVOQ qqUAGkClhdPuovAybGIV6MelArXieL/GoZREAaieQzuhtmtTcDnpix2+01DqXV8Iw5K6 MO65zxcwW4KrUICHQJBmsM2ZHOka1xCuJB7LN1+fLQujLs6RjNOqKE5Op5+zB9Mu9htv NZ8H3PTA6GmYaIFsaOxQITdF6Cs8Wd/pFK8AFv3VSw/eh/bwvp256uddfIbj/X6r4jyH Xsag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JKschoGOfSrt9RWijP/dk9HNvjRwYLO9J34qvRJjSWk=; b=ildUUqbO39rMEzUsK+VtEn8JG6hvH2XyqZtb4nr/tHPqLuGBtrvqt7pW7x/UMVMAl1 d/qdYdESsVf0LKWmWcADDmxJnRk0yZp+6qZIactbXNXtNOMiMI/lzeE9ntURcx4V51O5 gKD91ZVhsRhUWJChU4M7up4r+LXvkqg4GrbRa5hgNBPHoPJ11mimCKctiXFICJqt60Gh GSmtB2Ul0t5/BJhkRDAtfr7E4k15CWM6KrpVOygi7u8c+x8pmOv3+cAbqMKQEsi1G5SS Ec+/RvzXN5YdEA8RuojVeOAbm2d70NBmylshpnjFehLEj8A45yMcNYUV9afLsFLM/Nhp w+Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=bu4OkrIp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k11si24720595ejk.702.2021.10.06.02.44.09; Wed, 06 Oct 2021 02:44:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=bu4OkrIp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229824AbhJFJoM (ORCPT + 99 others); Wed, 6 Oct 2021 05:44:12 -0400 Received: from mail.skyhub.de ([5.9.137.197]:55664 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237963AbhJFJoK (ORCPT ); Wed, 6 Oct 2021 05:44:10 -0400 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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