Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2979818rwa; Mon, 22 Aug 2022 18:20:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR4ESR98FAP6n20fC+dTJzGs0oFZfCo7OrCnXFeNAr8SrYKaoe8pM/DqhlmCmECl9P2hrEeU X-Received: by 2002:a17:907:7ea2:b0:73d:8657:3bc2 with SMTP id qb34-20020a1709077ea200b0073d86573bc2mr3951210ejc.79.1661217657172; Mon, 22 Aug 2022 18:20:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1661217657; cv=pass; d=google.com; s=arc-20160816; b=vq2zrCIl75Rz1Ryan/IGE86Lv0RscwJ3Qy2OoxVboXSupPYrK/fF4bkz1zU8SIlvEc g3zjVSEYd8ZZQfdi4AEgpywXZLpSKe/GKWX03mNJ8s9biAh4VMPKye3FeReRog+EZKYT oIQ2fBq7solEXlWfX8zRLTG4jSUbsRPRc4W/S6uvwqd8Rdm7d+uTv0EBL2EvdADRQmNl PSUk6HRky+io6xu6kWuYml8F5Dwlrl7GfXxInIpU6jqrdYuLq09Rx0QZ5njz2xQg4BA0 yWeY19MFalzsNoF3jo8IcfUyeUZNxF5eSlch7vgPQ5AtyRNdjDoJ8j5mlTERr3fIcHfH narw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=amDe/rF6jS0EZUlKzZPc+/3iNrHylzVUJqNExQE22OU=; b=dipN3BR17QU02hu6uH1rhkUNE4VnNQoTafENDo74UVGlTehptx0PYoQJ6hJQNI3diw 9+pIKZWqroQOLdxZDcVjJ/tJJ/9Qkzl3Hzf28QewiN8i5KRowI35pF/29EUDk/svoPMd HxpVBuZKkzE4oIEhyhdVQC5X4rQBIM0Vy/nolfQ9cLoYQeaS15hMJ9zOJ64OFiUN18Cs +E2mXaDB2laYwpmrDoCw0d5YM/VXi0/avzHK99z5jnmtDDg0B+0qbWCDxpRbSw62QN8B Kq9iplT5et/q+ZIR+Wz2VklM6PHAuOq56KBLsqB+2PIu+qJciY56fGqT/gzctTxJ7Jlo gwBw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=RRe+0taJ; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p15-20020a056402074f00b004462b528a56si609959edy.620.2022.08.22.18.20.31; Mon, 22 Aug 2022 18:20:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=RRe+0taJ; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238934AbiHWBAo (ORCPT + 99 others); Mon, 22 Aug 2022 21:00:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238899AbiHWBA2 (ORCPT ); Mon, 22 Aug 2022 21:00:28 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2055.outbound.protection.outlook.com [40.107.94.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DEA24D14F for ; Mon, 22 Aug 2022 18:00:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xyw+8FqCNUlaJX4i2d5thO5soz+1gR2xHKiYKgGjIxILqgPnJABQI6+i9vf26wwXhWnHvhyh+5Yj43rGDHhsG5FEd3l4R7PqlasAmCE5Cjxe2wdo4DB8O5xUUKjcus1dFuoEcSDAD6YWC/vJVQDwbNpJqjIXVwZewfQeOE7mI6EvjTR/tiaSAchn/YmOw6GWgfjPDwL6YHzn7k2POCTNFDv4BXq+v9x9AIov4zHUdYpxC1pef8qZo2CQk4wqCBR1PVHpJwn0lmF61SCDhH+9h1ESrvXpUrnJtX8heMx5bb+0ERE84CPFlwCJcoTFbnNjx3KxICPoJYfXHbjEE8j1gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=amDe/rF6jS0EZUlKzZPc+/3iNrHylzVUJqNExQE22OU=; b=IoyAJ2gLqZ+iGuyUZkLqNsX/YSk/634zOI6DlZhgi0X3M7EX0xSYtMLWTQmz2qwJy9KFWzBeijX8R52OnKGIom8ZnFEnUKyg4YkZxBy2xj3xgHEvsofxyhNshrLErvKmh+hQEm32646n+M77GIXypjmF/v8mHw42I3At/f924r3YfT3IciHnI51tnEP+lXXOmkV464VWxnS9Xfa7Im9B9aHXdqhlYiIScmFYRNG7xheGzxFafBc171rTNPYwS7Hi3HzaygqpVQ/t4zebdZvF2VQKQLY4RKIR+dP9pzieGdScoMpiBN3ZT8kUDdPovR+KmhywO3UvhxkIwdHWZNXvUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=amDe/rF6jS0EZUlKzZPc+/3iNrHylzVUJqNExQE22OU=; b=RRe+0taJzh9W+KALahXf5FBIswQzQnVanO7XBW1zhuY+2f0M4cS1OzVlx7OVzopkgF8k/CyMBVmtivmbYwVjbTOVWmVlzBB/+ss1XrchsrmClx8cJenPc5ZEM0P5PPiTQf/j1/ye4GBpNA+SMx6ZiDcDG1VgFPGang/zMs0dOAzVQsbVpiXbcOD1NHO7bc6k4aMteMwWiGzKalrfHxZqw3UI0WtaGD/BrxDSfei5/zbr3uUtKR7IvU8xqWDPyTgrXRbUvZkdmGvPq7cgeMU/LeKflq/3iMsIyCofjk8u/UuhuvXTyH+1kJNgwNG1SMwviaQQzAMk5fScbuToyK0Iqw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB4192.namprd12.prod.outlook.com (2603:10b6:208:1d5::15) by MN0PR12MB6175.namprd12.prod.outlook.com (2603:10b6:208:3c4::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.22; Tue, 23 Aug 2022 01:00:23 +0000 Received: from MN2PR12MB4192.namprd12.prod.outlook.com ([fe80::462:7fe:f04f:d0d5]) by MN2PR12MB4192.namprd12.prod.outlook.com ([fe80::462:7fe:f04f:d0d5%8]) with mapi id 15.20.5546.022; Tue, 23 Aug 2022 01:00:23 +0000 Date: Mon, 22 Aug 2022 22:00:21 -0300 From: Jason Gunthorpe To: Takashi Iwai Cc: Lu Baolu , Joerg Roedel , Greg Kroah-Hartman , Bjorn Helgaas , Robin Murphy , Eric Auger , regressions@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [REGRESSION 5.19.x] AMD HD-audio devices missing on 5.19 Message-ID: <20220823010021.GA5967@nvidia.com> References: <874jy4cqok.wl-tiwai@suse.de> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874jy4cqok.wl-tiwai@suse.de> X-ClientProxiedBy: YQBPR01CA0157.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:7e::26) To MN2PR12MB4192.namprd12.prod.outlook.com (2603:10b6:208:1d5::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 37d93364-c153-4504-44d0-08da84a2dbab X-MS-TrafficTypeDiagnostic: MN0PR12MB6175:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lIM889uwlWrlfLcasoUPtk5Hyeyl6uojidg7JLodmd2bwNmYoKB2HuScg2dFCDE7bTKVjoume4yNLMaS1OPU/b/X6eZ3428lT9S94jhRvXafLsjrO1CnRDQ4FniCC1XsyudVR0/F3YyMpedvmyiy3RqOxQgymIcB9hCZeg3vOZhiGMlBBoXDHlyzeU1vn/gIlXoKII8dDDFKko39IT2RLAEJAGWRTSsd5sICbosicRq8R2EPpBV5WV4H88ceUrXPijBE0CmHEaG7JZikfWsVU9Mi6rZvILI8RD/4/ReI9IOhPiNhb1FLWsenJgzDgjLylrIRmJNvFxXZ9FxyDZh4JqWeCrGmEuN9l4PqSPD9DW3KTsEaNMP8rUMf4fobxxQ740aQn9DaEJf9Fuwt6a9o84XYysuVs7lNB7heytPKlhVbXstB1a1OH9wwYbblpSJQtZHD/FrVcEo/NVU0SZtt8yg9J4c86tl4sdtxtb8EC/6yevrHDDtbYAUEDANEBmc9OljgNJbixTehDQRdViRiXSaFfOUuuflHkDLSSmb3MYwihNX2r7hoh2Iy8WXwhvDQWwMVvlk/vfp8zFkpVzLJRi175Lrak6IgUHDQe5iefkiMpYsKUS6GXJIe39JB7ZkhC8lV/38HE6LQsvRh34Z/yNopbFbmqW9ks/rL7d1bi/TGSQQski4UjnXK/fZBFnzlPpKKlSjPZl9kIL29az7IKSObf1mNbaIvrwoTx80a6P1qZAFKuDwICdre4YX7MzsO96eoqQRCF2uOdaxJ6AsnU1YEbfozdKYuqj7hSDczS2o= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB4192.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(366004)(39860400002)(136003)(346002)(376002)(396003)(83380400001)(8936002)(66476007)(66946007)(8676002)(66556008)(4326008)(5660300002)(6512007)(6506007)(41300700001)(26005)(33656002)(36756003)(1076003)(186003)(2616005)(966005)(6486002)(2906002)(478600001)(86362001)(316002)(6916009)(54906003)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?JM7oThrkAlzKRs5yLzMfloRjyD6NqDmaj2GuwXckrMeLglM6FIn9eQVKd/ce?= =?us-ascii?Q?b+RBhpXJRL2N/gwAPaeIpjXFYL4VRCzLQV0oN9Let1HcHXq+opEww6GbVq7D?= =?us-ascii?Q?jAtmrWIN7tU8yJqo0tiD3ZFieveydbnfCPW9A+rGQTTX1t0e/0EdzEqtg58d?= =?us-ascii?Q?ZagLF9itt60SxeCCtJ/gzndpqt79kISLx/KybIhRIo+PE0zne9mJ/fX2iRU3?= =?us-ascii?Q?Dc4vJpkAC/2eQcfUIzKaKsodbDOJ/iiZM5XEXHzdvof2Roa3rdK0SvG3SU2L?= =?us-ascii?Q?sgPF8Et/mhkoHZ50Sep7vseNpkwUMtBGvYTXplKlflg05pkAa2tUjwTGEfMU?= =?us-ascii?Q?WKQQyx4CuxY3mU+RsUQpr59SrjoqlscZYHgQ61lYCkRAH3vbOA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++lfclswWECi9dWXhBRqFuNqWqwMSCs1ACOpiQSFjrchgvVOz7Oxlg?= =?us-ascii?Q?A9V3Vyw9VyLYa69tYbn4/+ifW2nhuMyzLS7khPhmtzZkFhz8B6QJJ1huW4Aq?= =?us-ascii?Q?YgNmd7xCtlK64Il4y/iHgA6JriqoinaZn4I0TGKbX6NU+QEk62AJnGGqSVEq?= =?us-ascii?Q?OpQE2WgKrQ35O88Vuu31qeZItkO+KiQx8zhYHZZCbGjPzSiIRqCwWPD4diZh?= =?us-ascii?Q?/Pv2xUvfoqn2XgtzxcGNtJUBxwN9ub+geY/zksWS3EEmrFxc1i2F0NjFDGuS?= =?us-ascii?Q?HQ9A91N1zStxc66iDdGmQ27FGKJGAkiM6jAIeOPx?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 37d93364-c153-4504-44d0-08da84a2dbab X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4192.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2022 01:00:23.3068 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 012HsOw+CiOx7i3YPL9ZjhAbcIFbisf6/qXGeDwxj6QPkSONC5x26nxxYcztC7mZ X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6175 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 22, 2022 at 04:12:59PM +0200, Takashi Iwai wrote: > Hi, > > we've received regression reports about the missing HD-audio devices > on AMD platforms, and this turned out to be caused by the commit > 512881eacfa72c2136b27b9934b7b27504a9efc2 > bus: platform,amba,fsl-mc,PCI: Add device DMA ownership management > > The details are found in openSUSE bugzilla: > https://bugzilla.suse.com/show_bug.cgi?id=1202492 > > The problem seems to be that HD-audio (both onboard analog and HDMI) > PCI devices are assigned to the same IOMMU group as AMD graphics PCI > device, and once after the AMDGPU is initialized beforehand, those > audio devices can't be probed since iommu_device_use_default_domain() > returns -EBUSY. Can you describe exactly what drivers are involved in this? If it is the above commit then several devices are sharing an iommu group and one of them (well, the only one already attached, I suppose) has made the group unsharable. With grep I don't see an obvious place where the AMDGPU driver would mess with the iommu configuration, so I have no guess. It would be good to have some debugging to confirm if it is group->owner (should be impossible, suggests memory corruption if it is) or group->domain != group->default_domain. Most likely it is the later, but I can't see how that could happen on a system like this.. There is no obvious manipulation in AMDGPU, for instance. So debugging to find the backtrace for exactly when group->domain != group->default_domain Occurs for the troubled group would be necessary. If you know the group name it would be easy enough to cook a patch to throw a warn on when group->domain changes > domain assignment. In anyway, disabling IOMMU works around the > problem, and passing driver_managed_dma flag to the HD-audio driver > was also confirmed to work around it, too. Disabling iommu removes the groups entirely, this disables the check. driver_managed_dma disables the check entirely - which raises the question how the driver is even able to work.. If the domain is not the default_domain it is very surprising that DMA can work at all. Since it does, something really odd has happened. Jason