Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4665161pxb; Tue, 5 Oct 2021 07:52:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWkHIf/nyCbkSWjYJ3musQNJgv55B6UCZp1v3FpPlQgoMb3hzcQ0sjWUSR+XaUTEWe6Bhp X-Received: by 2002:a05:6000:144e:: with SMTP id v14mr22465694wrx.228.1633445579436; Tue, 05 Oct 2021 07:52:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633445579; cv=none; d=google.com; s=arc-20160816; b=ACCSt3PqsGbKn6J3ezxub4SX3yuPuj1qUyqFFYLG8pXp4OyI70Bfa9mQBS66QNxsYT l/DvuPPe1CyapRG+brgNOTGLXBf2Pnjb3H0ri1Xy8lNzjO06gSdY9lBgdyRZ+b3LXgGT 0QGME/peUQXSEMyS4baBqcHZUrvzRerFdBqPaOsctyzHAHk7YZuQTPDs0LVcjXv8X7gf pFN+0O3GfNV0hw8mFFH+/2iWTmsXA3bKtXuzxwUu6WIMb7zS4tyM+PWD8W4lRUYxymaF i3sySsxnk66Gkyz0sd1vH2OQgXJp87MnW+yl11hDRQfTqpG86XPhrAWxEljPd4EzSadq fp+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=fP85uqPvsPSl2MUwxPDDeDYwMbz9jeEPyhfkUL7Uxk8=; b=LgEHm5JTt/D3RBNjEMSP41IU7tEP3LLkssTwPFgxiCEtqZ+VdtGMJXDJzlMPKenso3 STvGWV4FapVnJkkev6+n8GjSG80RiBtNBmwxIcPYtTjsTZKnu4NRRbezAfRJdudNr+fz qsZBkmPl9oldGq2hU4yhnTn0lqGcKkl4are7rySgmdKjF7GCxSzJQ4MTCRjkVVoSRjR0 3Oeq4lQtSFDmlMxfL6Sd+EqA+kUW7q05BmDhIF4/lalehF28ZTGQkJQIrxA1B9hH6AeB QCXA3u3t7U//ToILzCDebWNRgq/sbEpfmiMVZwKfct2xVx9U4ccuUC5eWlIYQJogFpsQ T3ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Lhcbo43r; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q16si22019402ejy.322.2021.10.05.07.52.32; Tue, 05 Oct 2021 07:52:59 -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=@gmail.com header.s=20210112 header.b=Lhcbo43r; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234850AbhJEOuS (ORCPT + 99 others); Tue, 5 Oct 2021 10:50:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233705AbhJEOuR (ORCPT ); Tue, 5 Oct 2021 10:50:17 -0400 Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15DC5C061749 for ; Tue, 5 Oct 2021 07:48:27 -0700 (PDT) Received: by mail-oi1-x22f.google.com with SMTP id v10so2331956oic.12 for ; Tue, 05 Oct 2021 07:48:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=fP85uqPvsPSl2MUwxPDDeDYwMbz9jeEPyhfkUL7Uxk8=; b=Lhcbo43r147Wu0u8Wpp+9wVGM//0MYXGTdRlFyuSbAdh5ABUTCucDCjgyRL/4SnoX7 bMioEsUENxhYa6S6Q2HQJFs9grfOcOzpZcmnOPjAFtZJLiQIrQ9M+gSNwsgq3qD8M+KZ tdiK4aSKR3Qw9+gkvCSl+IjUyGEFroTIx9wgF2WlpQ8fCmjUzoJdRQafIthSTAN4KBPi FQW3Vgar126Ayw2smtcCzwmHorrIgmeDmfX5HHR24bF7TaFs9iXO8tN1M7YeLF+Mj9/L 8HyM59eeQDQfZKhagPaUa5MeBbcqIImrpjmp6VbQkdxjV7BuWMIa8ILg6CJrhuOEZVyU 6PNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=fP85uqPvsPSl2MUwxPDDeDYwMbz9jeEPyhfkUL7Uxk8=; b=SLsUhCSNOLnPO+qmELjDg6oJCgzDQ0Au5QONHeERajk9YRyFhz/FkLe52sBfDvgEG1 P4qTl1I7XCVzA1++HVa1hxxq2TVrgb8LEnlQxR2qOgL3lfk3OGTR/teDqrUaPDKvKsHv W6S1rkZpfl1c5ok/+JdPcwWp+GAMBmvxrgQiDdleDLDoDjDsSQ3x+7r74Lb0/fsPz3Op JrhCW+kuI2apUbMPRvznsEUt3M5XMLRc9OWNeACns1PMb2cwuXv39qsICMg2GaMVvof4 630DRzAU6tMPm3hLFsNyCJYFqeyOoxGJ66svbxfEA+rMbAWH75ab7dJiERRl1SBwoU5M g2Uw== X-Gm-Message-State: AOAM532zD5CeSNF15KQ8gcgz+JQMZbny0XiF9nmrj9lJS3BwQ0FyvAx9 6v8WloMz/nGH6AjKSeYxBMrWwJ5K1NDUdKiUu9w= X-Received: by 2002:aca:ab4d:: with SMTP id u74mr2828586oie.120.1633445306493; Tue, 05 Oct 2021 07:48:26 -0700 (PDT) MIME-Version: 1.0 References: <8bbacd0e-4580-3194-19d2-a0ecad7df09c@molgen.mpg.de> In-Reply-To: <8bbacd0e-4580-3194-19d2-a0ecad7df09c@molgen.mpg.de> From: Alex Deucher Date: Tue, 5 Oct 2021 10:48:15 -0400 Message-ID: Subject: Re: `AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT=y` causes AMDGPU to fail on Ryzen: amdgpu: SME is not compatible with RAVEN To: Paul Menzel Cc: Tom Lendacky , Thomas Gleixner , Ingo Molnar , Borislav Petkov , X86 ML , Dave Hansen , Andy Lutomirski , Peter Zijlstra , LKML , amd-gfx list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 5, 2021 at 10:29 AM Paul Menzel wrote: > > Dear Tom, dear Linux folks, > > > Selecting the symbol `AMD_MEM_ENCRYPT` =E2=80=93 as done in Debian 5.13.9= -1~exp1 > [1] =E2=80=93 also selects `AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT`, as it def= aults > to yes, causing boot failures on AMD Raven systems. On the MSI B350M > MORTAR with AMD Ryzen 3 2200G, Linux logs and the AMDGPU graphics > driver, despite being loaded, does not work, and the framebuffer driver > is used instead. > > [ 19.679824] amdgpu 0000:26:00.0: amdgpu: SME is not compatible > with RAVEN > > It even causes black screens on other systems as reported to the Debian > bug tracking system *Black screen on AMD Ryzen based systems (AMDGPU > related when AMD Secure Memory Encryption not disabled -- > mem_encrypt=3Doff)* [2]. 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. Alex > > Should the default be changed? > > > Kind regards, > > Paul > > > [1]: > https://salsa.debian.org/kernel-team/linux/-/blob/master/debian/changelog= #L1138 > [2]: https://bugs.debian.org/994453