Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1550583lqp; Mon, 15 Apr 2024 09:31:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVypDd/OW7jm65EBB6X/78a9v73q3qAm760HsfFEm175pIUA0UhivwmGt3R2o2+mhbWUpkQIEcWiG/kut+aFpBCWjgkr2OrpJspsxRKXQ== X-Google-Smtp-Source: AGHT+IEyhnIHyDNetwYKN53gwgXXPkJu02nlVCxSNdHSmgZe0xI6X4BQjuiJzNuJmAEHF4Sm2Y/p X-Received: by 2002:a05:6808:2a69:b0:3c7:76c:c279 with SMTP id fu9-20020a0568082a6900b003c7076cc279mr5499787oib.14.1713198666472; Mon, 15 Apr 2024 09:31:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713198666; cv=pass; d=google.com; s=arc-20160816; b=vyIKQiKHUsjw4KobeXpHiLPseLfpHqA+AA+nkxqUYTgtyDgvllS3QdSC3NOkPAVbUP fgne+1i39/BacMq1yCWlRQYqV5qowL+CuBnUhHE3gzaQ7Kl3bhgjzl0/thauyjwEwrgI XHj9ltrY/WEFfB2fd9K0ZVhNUvxMYStRHR78mAiiSB9aghx3jklL+/IoBPPXhj+CfplZ vKmWjvUTK1U8gX/Z2Cl4wIxnAVCuAvtUjWXsFTYS0B0U+o02CAWwAqsCr3m83ndFqkZa /q3rYJJYU1gUtlgW+kos21oQa+oURTEsfDY9WOWM9bw8z6j8DT41zA3LswxXN5j6Gl09 jaXQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uzc9rltK+fu/nhD7W5oUEoxEFESmeqODhdUk35ZmiiA=; fh=ZnhrOAAkIbptG4mSKljaVfRF1G/dqVwtdyCvlfxY7MQ=; b=Q9TJs0jIKPSshdI70C0xE+HOjke+8xXBanU0Ri29kiBoA6hsou3R5aXO+KlLlEvUPQ WGT8OBH1618UlMmIApELz+XpKnYrB2thU4uwLXxfzp9kbZAfcb8PPmsXFRXbR8LeGbJj vjkDQGYscdZXIOV3AJPjLGkCx3DBPlLQm7Y7I58/QhGLGVR5U50CXsOyy3cYzmPLZbjg dKNIF1c/02xQKuglkTTvPKD4dmZ9rh3YitbkwiKfZGcL+8j0+y4pbH0n2qz/fWHM5CN7 8JHnBUPTe9jrbA5dH9woC5I9fGiVJRW2pWS0W6b+HwNeKTw7tsHPjoOfdKdJcVKYb3bl 2B/w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=E9iKxGqG; arc=pass (i=1 spf=pass spfdomain=ziepe.ca dkim=pass dkdomain=ziepe.ca); spf=pass (google.com: domain of linux-kernel+bounces-145552-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145552-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y7-20020a05622a120700b004364fb2f1adsi10223132qtx.233.2024.04.15.09.31.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 09:31:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-145552-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=E9iKxGqG; arc=pass (i=1 spf=pass spfdomain=ziepe.ca dkim=pass dkdomain=ziepe.ca); spf=pass (google.com: domain of linux-kernel+bounces-145552-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145552-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BB66E1C22BCE for ; Mon, 15 Apr 2024 16:31:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 956FD76C76; Mon, 15 Apr 2024 16:31:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="E9iKxGqG" Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 14AED36B for ; Mon, 15 Apr 2024 16:30:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713198659; cv=none; b=YTbjcua11gYg2OVXDEh6kDXNVrMTMDt6T+FLygI6ItaSLpbQln05jpX+NSaT62oI53bvZDTTDQ6NiFdYAoItJSrRqc+ysZsm8MVJe3yff7Vqms/vNF5WGMkFwg2ocyO1FjOJwtx2ORNCKIi8zodzDj3tPUhqcL7Ww+4+bQd6/wI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713198659; c=relaxed/simple; bh=asWqn6TIhxSjIZMFjKT2DKFcQXaURrA4gtx1BOtUuWs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nkBIlGPRKsfZQ8rfbqYecrzpMS6mLwTo63ZDvQs1v8FIehhXQLq2LDDnMoi1VATJ1Rd6AJbEUDhsk3ioMAtG9YMIlE9d2FD5iaXiNzcNiQU9jggYGD8QzIabE4MCUc7doW4Jh19+5IC9Zjm21N7vjCmGf9LKpu5/XKEePlY6u+I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=E9iKxGqG; arc=none smtp.client-ip=209.85.219.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Received: by mail-qv1-f41.google.com with SMTP id 6a1803df08f44-69b59c10720so12750446d6.3 for ; Mon, 15 Apr 2024 09:30:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1713198657; x=1713803457; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=uzc9rltK+fu/nhD7W5oUEoxEFESmeqODhdUk35ZmiiA=; b=E9iKxGqGfS9cXcR0FzbYv/l/hDVLPEWc+DNkne0mEWPwkjbt4PZfIbK5QWPaVACY1/ adM+IGqJLQlscT/rxKkKbedvOVhMTPks3pkfUlhP2YwVKncaYI4iWaduZ3dFtOkyE9mJ J6a61AtEtP0seDMAS2PybJfxgHVjOoqxCrmSdkt6NDuoq5vY2WJCNiD8y3ovrSCz78Yt v9L7V1dd/8iLRSOFwjiXqWFcdHluXhBPhIpfgqwi2SmgC7lZ8nR4lp3+m3gTkRdjGvlW ameHn/InKMyLwtvfJ/ICHbSDRlo+NW2od45OHwG3kJW6jtloGFRaN2hrX73bb6iBqbQP 9IVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713198657; x=1713803457; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uzc9rltK+fu/nhD7W5oUEoxEFESmeqODhdUk35ZmiiA=; b=e30JzK/+xwGwsTGq73lfdW7tMVnmyCDHW3YLodkG4qJWTsWfKERkDk4yqur1F/zDvq G/KjS0Qwib8CmiGzPtdgpwFITM50qbufKCgGJVND/dn8fTS7xdI/6F9XCS7AN9KDeKAN 0ZJw5em634B76G6YwemXn8bViPUWL6jA9xUKxOn3mPTOov8z6QkHVkcR0otfkNzyMvNk B6dtF4Y+VnOJl3VwB9XrS45RbgHMVV6FS+b5ZdRYcnDuolCRP3a1UH1kzdy/Iu9zr/G1 XloQQtssEObsQb59q5ALdJnMcN8KD97twKY8K50MbTTWTgErbcyH0lq9PlVi7P4/Ltad 7NfA== X-Forwarded-Encrypted: i=1; AJvYcCXy6wua9CyLM+0Q+z/I97875in+Rm+xvaVd3j9UHAKRXdkoAtFh0obpzsPVOpojUdRC52SPFOvj0tjFBaAqL7qVP+GSas6Iw1v5onhC X-Gm-Message-State: AOJu0YzNSvmxHhMETAHxaXkm4fk5DzKB8EigZhHDdu7NIuyeWt5hYCOI /7YJLCqYgOGoW+RfsWa9p9OVtaKvUwZFzaOqobYurupzcDuiY8exNpnm3U5mjoA= X-Received: by 2002:a05:6214:18e6:b0:699:2443:bcea with SMTP id ep6-20020a05621418e600b006992443bceamr9858534qvb.22.1713198657049; Mon, 15 Apr 2024 09:30:57 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-68-80-239.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.80.239]) by smtp.gmail.com with ESMTPSA id ej2-20020ad45a42000000b0069b7bc51271sm1549668qvb.123.2024.04.15.09.30.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 09:30:56 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1rwPEO-006EFV-4c; Mon, 15 Apr 2024 13:30:56 -0300 Date: Mon, 15 Apr 2024 13:30:56 -0300 From: Jason Gunthorpe To: Eric Wagner Cc: Joerg Roedel , Will Deacon , Suravee Suthikulpanit , Robin Murphy , iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: Kernel 6.7 regression doesn't boot if using AMD eGPU Message-ID: <20240415163056.GP223006@ziepe.ca> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Sat, Apr 13, 2024 at 06:04:12PM -0400, Eric Wagner wrote: > On my Thinkpad T14s G3 AMD (Ryzen 7 6850U) laptop connected to an AMD > RX 580 in Akitio Node Thunderbolt 3 eGPU. Booting with the eGPU > connected hangs on kernels 6.7 and 6.8, but worked on 6.6. For > debugging, I find that adding the kernel parameter amd_iommu=off seems > to fix the issue and allows booting with the eGPU on 6.7. > I tried bisecting the issue between 6.6 and 6.7 and ended up with: > "e8cca466a84a75f8ff2a7a31173c99ee6d1c59d2 is the first bad commit" in > the attached. This seems to indicate an amd iommu issue. > Two others also reported the same issue on AMD Ryzen 7 7840 with AMD RX > 6000 connected as eGPU > ([1]https://gitlab.freedesktop.org/drm/amd/-/issues/3182). > Let me know if you need more information. > > References > > 1. https://gitlab.freedesktop.org/drm/amd/-/issues/3182 > Bisecting: 366 revisions left to test after this (roughly 9 steps) > [74e9347ebc5be452935fe4f3eddb150aa5a6f4fe] Merge tag 'loongarch-fixes-6.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson > Bisecting: 182 revisions left to test after this (roughly 8 steps) > [f6176471542d991137543af2ef1c18dae3286079] Merge tag 'mtd/fixes-for-6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux > Bisecting: 87 revisions left to test after this (roughly 7 steps) > [fe3cfe869d5e0453754cf2b4c75110276b5e8527] Merge tag 'phy-fixes-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy > Bisecting: 43 revisions left to test after this (roughly 6 steps) > [c76c067e488ccd55734c3e750799caf2c5956db6] s390/pci: Use dma-iommu layer > Bisecting: 27 revisions left to test after this (roughly 5 steps) > [aa5cabc4ce8e6b45d170d162dc54b1bac1767c47] Merge tag 'arm-smmu-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/smmu > Bisecting: 14 revisions left to test after this (roughly 4 steps) > [bbc70e0aec287e164344b1a071bd46466a4f29b3] iommu/dart: Remove the force_bypass variable > Bisecting: 9 revisions left to test after this (roughly 3 steps) > [e82c175e63229ea495a0a0b5305a98b5b6ee5346] Revert "iommu/vt-d: Remove unused function" > Bisecting: 5 revisions left to test after this (roughly 2 steps) > [92bce97f0c341d3037b0f364b6839483f6a41cae] s390/pci: Fix reset of IOMMU software counters > Bisecting: 3 revisions left to test after this (roughly 2 steps) > [3613047280ec42a4e1350fdc1a6dd161ff4008cc] Merge tag 'v6.6-rc7' into core > Bisecting: 2 revisions left to test after this (roughly 1 step) > [f7da9c081517daba70f9f9342e09d7a6322ba323] iommu/tegra-smmu: Drop unnecessary error check for for debugfs_create_dir() > Bisecting: 1 revision left to test after this (roughly 1 step) > [9e13ec61de2a51195b122a79461431d8cb99d7b5] iommu/virtio: Add __counted_by for struct viommu_request and use struct_size() > Bisecting: 0 revisions left to test after this (roughly 0 steps) > [6e6c6d6bc6c96c2477ddfea24a121eb5ee12b7a3] iommu: Avoid unnecessary cache invalidations > e8cca466a84a75f8ff2a7a31173c99ee6d1c59d2 is the first bad commit > commit e8cca466a84a75f8ff2a7a31173c99ee6d1c59d2 > Merge: 6e6c6d6bc6 f7da9c0815 aa5cabc4ce 9e13ec61de e82c175e63 cedc811c76 3613047280 92bce97f0c > Author: Joerg Roedel > Date: Fri Oct 27 09:13:40 2023 +0200 > > Merge branches 'iommu/fixes', 'arm/tegra', 'arm/smmu', 'virtio', 'x86/vt-d', 'x86/amd', 'core' and 's390' into next Do you have the good/bad log on this? It doesn't look like bisect tested enough stuff to really conclude the merge is the bad thing, at a minimum it should be testing all the bases of the merge. Do you have --first-parent set or something? I would test cedc811c76778bdef91d405717acee0de54d8db5 (x86/amd) and 3613047280ec42a4e1350fdc1a6dd161ff4008cc (core) directly. Most likely cedc will be bad problem. If one of them is bad then restart the bisection with that as the bad and 6e6c6d6bc6 as the good. (or run bisect again with e8cca466a84a75f8ff2a7a31173c99ee6d1c59d2 as the bad and 6e6c6d6bc6c96c2477ddfea24a121eb5ee12b7a3 as the good without --first-parent) Jason