Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2987457lqo; Tue, 21 May 2024 03:33:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVJFwhIPua8Ahg7Pi5VBDxOtODqI1y1opmrQn4mq/3g0GI3TX/pL8/xANTMZYzL6zIamtQVrzeLvMyNWL0SlN34TYoBBF0cgKvVQvyaew== X-Google-Smtp-Source: AGHT+IHgU+B5w9c5xOipdVYTfq3yjiFQxGd5lH0SDpi0mUFeM2KsxHBE/bltwt4e9kSnOj/lHsNg X-Received: by 2002:a05:6214:3a03:b0:6a9:df3c:44b4 with SMTP id 6a1803df08f44-6a9df3c45bfmr69944296d6.56.1716287613187; Tue, 21 May 2024 03:33:33 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f304b3csi273451956d6.555.2024.05.21.03.33.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 03:33:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184807-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=@amd.com header.s=selector1 header.b=uKCjrxFN; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-184807-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184807-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com 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 D62071C2174C for ; Tue, 21 May 2024 10:33:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E7B656BFA3; Tue, 21 May 2024 10:33:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="uKCjrxFN" Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2079.outbound.protection.outlook.com [40.107.244.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 927F521350 for ; Tue, 21 May 2024 10:33:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.79 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716287607; cv=fail; b=AZzBeJlfTzabI6rtHtMv2rW75vjsXM1zD2h1Te1Crf8pOCtMGmDL0ZphAiM0NoqiH2tZbNrCziSXyIo/JEgnWUWDKJu9jf//7X10lZ/xq8S6mG7Wg02K9GhhNfw0HPlxagVr+tTVDOdhk0PUJHYPJwNTWgwBWQum6Zz1oMAO/PE= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716287607; c=relaxed/simple; bh=JZtXueNVpL4Sz4fOH8plYfd29CRiGP36DhvfWg+UFgY=; h=Message-ID:Date:Subject:To:References:From:In-Reply-To: Content-Type:MIME-Version; b=n8UAmczn2Gup3Gc/AILkpV1bZMwMIrBH5A9rhm13pZ2l6cn094GVzDIDML0tmZFPJKDkg4fNs4QjMHhruYdmiUzvMfdt71fO5w4Cyru29UIRFXWMDKsG/7Rkaz1FiDU9S/Y4puGwuffAhuhhbUhccUANVInh5rq3Z/o4982uXyA= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=uKCjrxFN; arc=fail smtp.client-ip=40.107.244.79 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e7R/BwbeLbQxlie/leXHTga0c+sTyrrgsjAAibvuwFaMFNVlY3C/FNL9mv4JPR5xy6/1ik3CZ4K65dLGOm42eE4upc/f2FdHS5mEjcq/7HJwvbEHYSsKHPnhCqo9Pxwy82swgHmrb8OLd6UYN/JDi/JO9GJWlvNk2Y0P9u4LRnnyyIJOrywVeFUnd9bcCCBjB3QybnoWU0w/NJNdLjzEVcpODtfYnn0TUTAF3/MtUf+3zzGI3aifxhxhAH/thAj67jXC+Oi/IRNfPgXnVtVkG3sSRqVUzg2i5idEaXxWXUiLViZNHs8vgq8aMeWoJD9b673RiGw3KpyTJ1mopUBgsA== 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=tjwFZMQ197X6JOxWAuWtqpfNFiJr81YjNcPMvmeliMk=; b=g+hmadtYHPWs5xOIkOBkWGx31B/xiJpk+avHR9FTTCxCxX9a2TzwvrZKrbthrdg+srH8T9huQIOVb9V109CgwNbdPhrK19Trv6gy/Y3WqM6NUOzWZsPWfYvsUgMBu49PbsvPgPdisJZ1jvRXQmQKrxd2qhZHANXs+RBQHxI8OJeLUdsdoO5+sAMqrKerTtD2feT9dCOpbHU8cQYsFzil4cN0S0QucE2lENNL4KI0S8ADjpUL84oZTEdArbOEf/iiWrxy99r3Oj2emkKMa+ddviDxARXeCfU0Okq94GZC03SHVZciPwP6TIvYkaB51PiOyVZai7FDGrYR6awJXwNAZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tjwFZMQ197X6JOxWAuWtqpfNFiJr81YjNcPMvmeliMk=; b=uKCjrxFNdwP08EsLZx6x/0B+pMBovUMfLsUuVzz8RFiKcGcqFqWfyK1VdXfVxjXNUxw49cOUM9XVHuZwabmLlSUeSNTwC5d8l3tbkRNbocK7kYHRCBt4kkigB3NK33rqzdWbl819u4YWzAixUQavoFEWdezsjXIynluPZOW1fnE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DS7PR12MB6048.namprd12.prod.outlook.com (2603:10b6:8:9f::5) by SJ2PR12MB7797.namprd12.prod.outlook.com (2603:10b6:a03:4c5::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.36; Tue, 21 May 2024 10:33:22 +0000 Received: from DS7PR12MB6048.namprd12.prod.outlook.com ([fe80::af7d:5f4f:2139:ebd1]) by DS7PR12MB6048.namprd12.prod.outlook.com ([fe80::af7d:5f4f:2139:ebd1%4]) with mapi id 15.20.7587.035; Tue, 21 May 2024 10:33:22 +0000 Message-ID: Date: Tue, 21 May 2024 16:03:13 +0530 User-Agent: Mozilla Thunderbird Subject: Re: 6.10/regression/bisected commit c4cb23111103 causes sleeping function called from invalid context at kernel/locking/mutex.c:585 To: Mikhail Gavrilov , suravee.suthikulpanit@amd.com, jgg@nvidia.com, jroedel@suse.de, "Deucher, Alexander" , amd-gfx list , dri-devel , Linux List Kernel Mailing References: Content-Language: en-US From: Vasant Hegde In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN3PR01CA0009.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:95::17) To DS7PR12MB6048.namprd12.prod.outlook.com (2603:10b6:8:9f::5) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR12MB6048:EE_|SJ2PR12MB7797:EE_ X-MS-Office365-Filtering-Correlation-Id: d1df44ef-ff24-4ae3-7cf1-08dc79817021 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|1800799015|376005; X-Microsoft-Antispam-Message-Info: =?utf-8?B?cDRwaDRJdUszWktFeHR5YWtQWEUzdVZwUi9QZ04rclo1Y1M0eVQ5a2tnN2xi?= =?utf-8?B?NjBybEM5bzVOK1lmSnlzL3M0N0xObjdkdXVvQ2lYZE1oblFWMExTRDdyUnB1?= =?utf-8?B?OUZlZC81bFdNbjVzNjJWMXlrcWhtTDVEOXZKOEk3MGdmNnJmNVQ2OExEWlRi?= =?utf-8?B?SVFWWUw2TW5PZ3lFMlRJWTdZOTl5clRTYm9zdnFGS1NtZExBYUhSR2dMcDln?= =?utf-8?B?cCtMcGZoNkRGQW9vbE9waThCVnVJVStISzlUTlhPTnZmdHNkUEhsNGdxaTJP?= =?utf-8?B?Y0YzNkE4OFJzWDJ6c2MyYWdJand6V2V4b3dlSUhmdnAxUmVFQitKSkprblFa?= =?utf-8?B?YmpuZXlzQU9wSmh5Q1gvdmMra3g1SkJnNmRmcVJUQTZiVXAxYlBaRkZOTVRW?= =?utf-8?B?UTNCWHFpSkJMb3hJTEIrc0NlOGgxZTRkanpVVjNLcEZxRjBlVWcwdlZjSjBX?= =?utf-8?B?RmFoS2VKd2tYcnpHcnZObUE3VzF3enJLZko5YS9DYmp3Rjh0Q2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bUl6UGxzcWlzUjZLWjFZci8vam5Vc3hLU1VEakdB?= =?utf-8?B?WUh6SCtBNW9Sam5LSklVS2FzWGFLMFBUY3Y1Tkc5enNEZkZxRUhGaWMzbXNs?= =?utf-8?B?YStKMVVKWndRRGRzVEw0OWpxSlNaNkxLNXJ0bjR3c2xDOWVUc3A4anNZZExR?= =?utf-8?B?YldLdUVMc2YzeVo1alJ2YXNseitMVzlyaDFvNUpZeU1YUDZnY0NNQi8wT2Fy?= =?utf-8?Q?DA5rRBG7Eev76nbmNlqMGlPlduVcwGjnGg2k7uJEl+iQ=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR12MB6048.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(1800799015)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WHNYZTNUMVh3ckZTNk1MaEJzYWY2QUROTkhDU0ZBMXBtVFVlVGV0cXpmajd2?= =?utf-8?B?cGg0RmI5UU1NRmZ2NGNJaVdPVWNuZHhrbmV1UENIYTd6bmlldnQveThRaUFU?= =?utf-8?B?T3IzSTNQRUw2b0RRajVDNStuNGh3REJSWVgvMmNOQUxOUTBqbk0vaHBrMnhM?= =?utf-8?B?OTd0b1U0dnloT1VoeHY2LytOUjFEZXFPTmRwQWJzeTFHekR2UFI4ZDhwZW10?= =?utf-8?B?QXdDTjlWQVNHNHNaQUJIV1BsSXVJdUhrSUpKZy9RNlFqVHdQc2VhTUlieXBZ?= =?utf-8?B?RVllR1hZdXZndzZUOXJaOFFlVGplUEtzSXVRMVpQQmRTSFRhSSswVWIvM3ZX?= =?utf-8?B?cyt0cHNpSVlQSjNuRUViaUZQSWtKY1RUQ0c2OVc1M2ZMSUJENFVUQ1dRWGhW?= =?utf-8?B?OVdLbWZ1UE5sbmJyVzZyND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Source: DS7PR12MB6048.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2024 10:33:22.2258 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: AcPr3pzTsPzstrGKMPXqjDuCP9d5yonqlrxy3d6R770edKDJk5vQ7BXqOCTdcI9TnRGAiQ4EPP0mIm2B9beMVw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB7797 Hi Mikhail, Thanks for the report. I will look into it this week and get back to you. -Vasant On 5/21/2024 3:09 PM, Mikhail Gavrilov wrote: > Hi, > Yesterday on the fresh kernel snapshot > I spotted a new bug message with follow stacktrace: > [ 4.307097] BUG: sleeping function called from invalid context at > kernel/locking/mutex.c:585 > [ 4.307135] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: > 1, name: swapper/0 > [ 4.307150] preempt_count: 3, expected: 0 > [ 4.307159] RCU nest depth: 0, expected: 0 > [ 4.307168] 4 locks held by swapper/0/1: > [ 4.307176] #0: ffff8881080ba920 (&group->mutex){+.+.}-{3:3}, at: > bus_iommu_probe+0xf6/0x4c0 > [ 4.307203] #1: ffff88811654c1b8 (&domain->lock){....}-{2:2}, at: > amd_iommu_attach_device+0x1ad/0x1e80 > [ 4.307227] #2: ffff888113518c18 (&dev_data->lock){....}-{2:2}, > at: amd_iommu_attach_device+0x213/0x1e80 > [ 4.307243] #3: ffff888108393030 (&iommu->lock){....}-{2:2}, at: > amd_iommu_iopf_add_device+0x69/0x140 > [ 4.307243] irq event stamp: 1021718 > [ 4.307243] hardirqs last enabled at (1021717): > [] kasan_quarantine_put+0x12e/0x250 > [ 4.307243] hardirqs last disabled at (1021718): > [] _raw_spin_lock_irqsave+0x7c/0xa0 > [ 4.307243] softirqs last enabled at (1020154): > [] __irq_exit_rcu+0xbb/0x1c0 > [ 4.307243] softirqs last disabled at (1020147): > [] __irq_exit_rcu+0xbb/0x1c0 > [ 4.307243] Preemption disabled at: > [ 4.307243] [<0000000000000000>] 0x0 > [ 4.307243] CPU: 0 PID: 1 Comm: swapper/0 Not tainted > 6.10.0-0.rc0.20240520giteb6a9339efeb.9.fc41.x86_64+debug #1 > [ 4.307243] Hardware name: ASUS System Product Name/ROG STRIX > B650E-I GAMING WIFI, BIOS 2611 04/07/2024 > [ 4.307243] Call Trace: > [ 4.307243] > [ 4.307243] dump_stack_lvl+0x84/0xd0 > [ 4.307243] __might_resched.cold+0x1f7/0x23d > [ 4.307243] ? __pfx___might_resched+0x10/0x10 > [ 4.307243] __mutex_lock+0xf3/0x13f0 > [ 4.307243] ? iopf_queue_add_device+0xd2/0x5d0 > [ 4.307243] ? __pfx___mutex_lock+0x10/0x10 > [ 4.307243] ? find_held_lock+0x34/0x120 > [ 4.307243] ? __pfx_lock_acquired+0x10/0x10 > [ 4.307243] ? iopf_queue_add_device+0xd2/0x5d0 > [ 4.307243] iopf_queue_add_device+0xd2/0x5d0 > [ 4.307243] amd_iommu_iopf_add_device+0xcd/0x140 > [ 4.307243] amd_iommu_attach_device+0xdc8/0x1e80 > [ 4.307243] ? iommu_create_device_direct_mappings+0x571/0x7d0 > [ 4.307243] __iommu_attach_device+0x64/0x250 > [ 4.307243] __iommu_device_set_domain+0x122/0x1c0 > [ 4.307243] __iommu_group_set_domain_internal+0xfa/0x2d0 > [ 4.307243] iommu_setup_default_domain+0x918/0xcd0 > [ 4.307243] bus_iommu_probe+0x1ad/0x4c0 > [ 4.307243] ? __pfx_bus_iommu_probe+0x10/0x10 > [ 4.307243] iommu_device_register+0x184/0x230 > [ 4.307243] ? amd_iommu_iopf_init+0xfd/0x170 > [ 4.307243] iommu_go_to_state+0xf87/0x3890 > [ 4.307243] ? __pfx_iommu_go_to_state+0x10/0x10 > [ 4.307243] ? lockdep_hardirqs_on+0x7c/0x100 > [ 4.307243] ? _raw_spin_unlock_irqrestore+0x4f/0x80 > [ 4.307243] ? add_device_randomness+0xb8/0xf0 > [ 4.307243] ? __pfx_add_device_randomness+0x10/0x10 > [ 4.307243] ? __pfx_pci_iommu_init+0x10/0x10 > [ 4.307243] amd_iommu_init+0x21/0x60 > [ 4.307243] ? __pfx_pci_iommu_init+0x10/0x10 > [ 4.307243] pci_iommu_init+0x38/0x60 > [ 4.307243] do_one_initcall+0xd6/0x460 > [ 4.307243] ? __pfx_do_one_initcall+0x10/0x10 > [ 4.307243] ? kernel_init_freeable+0x4cb/0x750 > [ 4.307243] ? kasan_unpoison+0x44/0x70 > [ 4.307243] kernel_init_freeable+0x6b4/0x750 > [ 4.307243] ? __pfx_kernel_init_freeable+0x10/0x10 > [ 4.307243] ? __pfx_kernel_init+0x10/0x10 > [ 4.307243] ? __pfx_kernel_init+0x10/0x10 > [ 4.307243] kernel_init+0x1c/0x150 > [ 4.307243] ? __pfx_kernel_init+0x10/0x10 > [ 4.307243] ret_from_fork+0x31/0x70 > [ 4.307243] ? __pfx_kernel_init+0x10/0x10 > [ 4.307243] ret_from_fork_asm+0x1a/0x30 > [ 4.307243] > > [ 4.307243] ============================= > [ 4.307243] [ BUG: Invalid wait context ] > [ 4.307243] 6.10.0-0.rc0.20240520giteb6a9339efeb.9.fc41.x86_64+debug > #1 Tainted: G W ------- --- > [ 4.307243] ----------------------------- > [ 4.307243] swapper/0/1 is trying to lock: > [ 4.307243] ffff88810de2fa88 (&queue->lock){....}-{3:3}, at: > iopf_queue_add_device+0xd2/0x5d0 > [ 4.307243] other info that might help us debug this: > [ 4.307243] context-{4:4} > [ 4.307243] 4 locks held by swapper/0/1: > [ 4.307243] #0: ffff8881080ba920 (&group->mutex){+.+.}-{3:3}, at: > bus_iommu_probe+0xf6/0x4c0 > [ 4.307243] #1: ffff88811654c1b8 (&domain->lock){....}-{2:2}, at: > amd_iommu_attach_device+0x1ad/0x1e80 > [ 4.307243] #2: ffff888113518c18 (&dev_data->lock){....}-{2:2}, > at: amd_iommu_attach_device+0x213/0x1e80 > [ 4.307243] #3: ffff888108393030 (&iommu->lock){....}-{2:2}, at: > amd_iommu_iopf_add_device+0x69/0x140 > [ 4.307243] stack backtrace: > [ 4.307243] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W > ------- --- > 6.10.0-0.rc0.20240520giteb6a9339efeb.9.fc41.x86_64+debug #1 > [ 4.307243] Hardware name: ASUS System Product Name/ROG STRIX > B650E-I GAMING WIFI, BIOS 2611 04/07/2024 > [ 4.307243] Call Trace: > [ 4.307243] > [ 4.307243] dump_stack_lvl+0x84/0xd0 > [ 4.307243] __lock_acquire.cold+0x1fe/0x2a0 > [ 4.307243] ? __pfx___lock_acquire+0x10/0x10 > [ 4.307243] ? ret_from_fork_asm+0x1a/0x30 > [ 4.307243] lock_acquire+0x1ae/0x540 > [ 4.307243] ? iopf_queue_add_device+0xd2/0x5d0 > [ 4.307243] ? __pfx_lock_acquire+0x10/0x10 > [ 4.307243] ? __printk_cpu_sync_put+0x35/0x60 > [ 4.307243] ? add_taint+0x2a/0x70 > [ 4.307243] ? __might_resched.cold+0x203/0x23d > [ 4.307243] ? __pfx___might_resched+0x10/0x10 > [ 4.307243] __mutex_lock+0x189/0x13f0 > [ 4.307243] ? iopf_queue_add_device+0xd2/0x5d0 > [ 4.307243] ? iopf_queue_add_device+0xd2/0x5d0 > [ 4.307243] ? __pfx___mutex_lock+0x10/0x10 > [ 4.307243] ? find_held_lock+0x34/0x120 > [ 4.307243] ? __pfx_lock_acquired+0x10/0x10 > [ 4.307243] ? iopf_queue_add_device+0xd2/0x5d0 > [ 4.307243] iopf_queue_add_device+0xd2/0x5d0 > [ 4.307243] amd_iommu_iopf_add_device+0xcd/0x140 > [ 4.307243] amd_iommu_attach_device+0xdc8/0x1e80 > [ 4.307243] ? iommu_create_device_direct_mappings+0x571/0x7d0 > [ 4.307243] __iommu_attach_device+0x64/0x250 > [ 4.307243] __iommu_device_set_domain+0x122/0x1c0 > [ 4.307243] __iommu_group_set_domain_internal+0xfa/0x2d0 > [ 4.307243] iommu_setup_default_domain+0x918/0xcd0 > [ 4.307243] bus_iommu_probe+0x1ad/0x4c0 > [ 4.307243] ? __pfx_bus_iommu_probe+0x10/0x10 > [ 4.307243] iommu_device_register+0x184/0x230 > [ 4.307243] ? amd_iommu_iopf_init+0xfd/0x170 > [ 4.307243] iommu_go_to_state+0xf87/0x3890 > [ 4.307243] ? __pfx_iommu_go_to_state+0x10/0x10 > [ 4.307243] ? lockdep_hardirqs_on+0x7c/0x100 > [ 4.307243] ? _raw_spin_unlock_irqrestore+0x4f/0x80 > [ 4.307243] ? add_device_randomness+0xb8/0xf0 > [ 4.307243] ? __pfx_add_device_randomness+0x10/0x10 > [ 4.307243] ? __pfx_pci_iommu_init+0x10/0x10 > [ 4.307243] amd_iommu_init+0x21/0x60 > [ 4.307243] ? __pfx_pci_iommu_init+0x10/0x10 > [ 4.307243] pci_iommu_init+0x38/0x60 > [ 4.307243] do_one_initcall+0xd6/0x460 > [ 4.307243] ? __pfx_do_one_initcall+0x10/0x10 > [ 4.307243] ? kernel_init_freeable+0x4cb/0x750 > [ 4.307243] ? kasan_unpoison+0x44/0x70 > [ 4.307243] kernel_init_freeable+0x6b4/0x750 > [ 4.307243] ? __pfx_kernel_init_freeable+0x10/0x10 > [ 4.307243] ? __pfx_kernel_init+0x10/0x10 > [ 4.307243] ? __pfx_kernel_init+0x10/0x10 > [ 4.307243] kernel_init+0x1c/0x150 > [ 4.307243] ? __pfx_kernel_init+0x10/0x10 > [ 4.307243] ret_from_fork+0x31/0x70 > [ 4.307243] ? __pfx_kernel_init+0x10/0x10 > [ 4.307243] ret_from_fork_asm+0x1a/0x30 > [ 4.307243] > [ 4.311628] AMD-Vi: Extended features (0x246577efa2254afa, 0x0): > PPR NX GT [5] IA GA PC GA_vAPIC > [ 4.311639] AMD-Vi: Interrupt remapping enabled > [ 4.366191] AMD-Vi: Virtual APIC enabled > > Bisect pointed to commit: > commit c4cb23111103a841c2df30058597398443bcad5f (HEAD) > Author: Vasant Hegde > Date: Thu Apr 18 10:33:57 2024 +0000 > > iommu/amd: Add support for enable/disable IOPF > > Return success from enable_feature(IOPF) path as this interface is going > away. Instead we will enable/disable IOPF support in attach/detach device > path. > > In attach device path, if device is capable of PRI, then we will add it to > per IOMMU IOPF queue and enable PPR support in IOMMU. Also it will > attach device to domain even if it fails to enable PRI or add device to > IOPF queue as device can continue to work without PRI support. > > In detach device patch it follows following sequence: > - Flush the queue for the given device > - Disable PPR support in DTE[devid] > - Remove device from IOPF queue > - Disable device PRI > > Also add IOMMU_IOPF as dependency to AMD_IOMMU driver. > > Co-developed-by: Suravee Suthikulpanit > Signed-off-by: Suravee Suthikulpanit > Signed-off-by: Vasant Hegde > Reviewed-by: Jason Gunthorpe > Link: https://lore.kernel.org/r/20240418103400.6229-13-vasant.hegde@amd.com > Signed-off-by: Joerg Roedel > > drivers/iommu/amd/Kconfig | 1 + > drivers/iommu/amd/amd_iommu.h | 4 ++++ > drivers/iommu/amd/iommu.c | 39 +++++++++++++++++++++++++++++++-------- > drivers/iommu/amd/ppr.c | 41 +++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 77 insertions(+), 8 deletions(-) > > > Unfortunately I can't check revert c4cb23111103 due to conflicts: >> git revert -n c4cb23111103a841c2df30058597398443bcad5f > Auto-merging drivers/iommu/amd/Kconfig > CONFLICT (content): Merge conflict in drivers/iommu/amd/Kconfig > Auto-merging drivers/iommu/amd/amd_iommu.h > Auto-merging drivers/iommu/amd/iommu.c > CONFLICT (content): Merge conflict in drivers/iommu/amd/iommu.c > Auto-merging drivers/iommu/amd/ppr.c > error: could not revert c4cb23111103... iommu/amd: Add support for > enable/disable IOPF > > > I also attach below a full kernel log and build config. > > My hardware specs: https://linux-hardware.org/?probe=ca80d0a307 > > Vasant or anyone else from the AMD team can you look please. >