Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3981863rdb; Mon, 11 Dec 2023 05:53:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFPFpqmrH2anJEOKRijbaGBpEsPKCtTS82uz/lJuE9AOADHXVvUYT15yk4RCr2emFCYTOlU X-Received: by 2002:a17:902:da91:b0:1d0:bcb2:b905 with SMTP id j17-20020a170902da9100b001d0bcb2b905mr1863663plx.121.1702302836579; Mon, 11 Dec 2023 05:53:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702302836; cv=none; d=google.com; s=arc-20160816; b=N4NbGuwEHPaxdHhgfoBRYTc5qDYSN1rNRjpp008Cgu6oqMgrkGczhsS2mJ4whAUxf0 9RC8IRiTG64a8J0c/D/j+/EKjTEDVEIt5s6rW4yuzUwOZQb7/fz+Cstp9TklrRYfOUiD 6bHtA8CvfSd1uH2G/7ScZ1fldupO0G2yCedyICB6uICqT7+aos2RYoS7fVJ34z82CSHl 7xVm5U2cJLjIaWdd+Jm9adi+hEs5o4m+rixms3edhxrB+YheKo/2RwLcM7cCz6JQCDEH 8n8c/O4y/mQf8MK28RmIBvJwvz4jjFQsCazdwVRjMVe/ZMNw1I08X7Q/ALgJxurCTxul HV5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=avBUdeWxQQuTeoXzMyzLwtUcxRoUm/focQrUFuaMKHA=; fh=MbDBBqVnz8xgHPvPhwU5s+PRWsZ+hw3Uakh5qlk4r84=; b=I2fdN4F/nZc42VaLgLYysuzbQhnGEKVxEKjrpu3a9n5RoPDuG0Yj/vj7AqNs2Ip3jv fowEZZG/rvWvozRbews3XpSFouIjzsSnTIAgamYDjpND77Cni9gfUUURpypjvR0I+gN1 DrFlKFWSXn1JSOYWZm4otgm+fp/TnqPquuy5ZYKGzuVhPR3aqUA85werzG5tZ+D+36Ee nzXMf84tt80BP+L1XTM45TWoc4J7zrlAZSZipGKlYRpYSAY71gLENJM0+9Zf2Je+gclK 6ySjzCU9/r+bTERblEg+grKZ6QX85dwWzn9UBuatLqh82ZTpE8wErfrYAX2YV/Mk8t4F JVqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id u10-20020a170902e80a00b001d05814624esi6149329plg.385.2023.12.11.05.53.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 05:53:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 2CF2E8040D66; Mon, 11 Dec 2023 05:53:54 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234618AbjLKNxj (ORCPT + 99 others); Mon, 11 Dec 2023 08:53:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343719AbjLKNxI (ORCPT ); Mon, 11 Dec 2023 08:53:08 -0500 Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE97A1BC0; Mon, 11 Dec 2023 05:52:47 -0800 (PST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 512AF453EF; Mon, 11 Dec 2023 14:52:43 +0100 (CET) Message-ID: Date: Mon, 11 Dec 2023 14:52:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: SCSI hotplug issues with UEFI VM with guest kernel >= 6.5 Content-Language: en-US To: Igor Mammedov , Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, bhelgaas@google.com, lenb@kernel.org, rafael@kernel.org, Thomas Lamprecht References: <9eb669c0-d8f2-431d-a700-6da13053ae54@proxmox.com> <20231207232815.GA771837@bhelgaas> <20231208164723.12828a96@imammedo.users.ipa.redhat.com> <20231211084604.25e209af@imammedo.users.ipa.redhat.com> From: Fiona Ebner In-Reply-To: <20231211084604.25e209af@imammedo.users.ipa.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 11 Dec 2023 05:53:54 -0800 (PST) Am 11.12.23 um 08:46 schrieb Igor Mammedov: > On Fri, 8 Dec 2023 16:47:23 +0100 > Igor Mammedov wrote: > >> On Thu, 7 Dec 2023 17:28:15 -0600 >> Bjorn Helgaas wrote: >> >>> >>> What's the actual symptom that this is broken? All these log >>> fragments show the exact same assignments for BARs 0, 1, 4 and for the >>> bridge windows. >>> The disk never shows up in /dev >>> I assume 0000:01:02.0 is the hot-added SCSI HBA, and 00:05.0 is a >>> bridge leading to it? >>> >>> Can you put the complete dmesg logs somewhere? There's a lot of >>> context missing here. >>> Is this still necessary with Igor being able to reproduce the issue? >>> Do you have to revert both cc22522fd55e2 and 40613da52b13f to make it >>> work reliably? If we have to revert something, reverting one would be >>> better than reverting both. >> Just reverting cc22522fd55e2 is not enough (and cc22522fd55e2 fixes 40613da52b13f so I can't revert just 40613da52b13f). > > Fiona, > > Does it help if you use q35 machine with '-global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' option? > Yes, it does :) I added the following to my QEMU commandline (first line, because there wouldn't be a "pci.0" otherwise): > -device 'pci-bridge,id=pci.0,chassis_nr=4' \ > -machine 'q35' \ > -global 'ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off' \ and while it takes a few seconds, the disk does show up successfully: > Dec 11 13:07:32 hotplug kernel: shpchp 0000:01:05.0: Latch close on Slot(2-1) > Dec 11 13:07:32 hotplug kernel: shpchp 0000:01:05.0: Button pressed on Slot(2-1) > Dec 11 13:07:32 hotplug kernel: shpchp 0000:01:05.0: Card present on Slot(2-1) > Dec 11 13:07:32 hotplug kernel: shpchp 0000:01:05.0: PCI slot #2-1 - powering on due to button press > Dec 11 13:07:38 hotplug kernel: pci 0000:02:02.0: [1af4:1004] type 00 class 0x010000 > Dec 11 13:07:38 hotplug kernel: pci 0000:02:02.0: reg 0x10: [io 0x0000-0x003f] > Dec 11 13:07:38 hotplug kernel: pci 0000:02:02.0: reg 0x14: [mem 0x00000000-0x00000fff] > Dec 11 13:07:38 hotplug kernel: pci 0000:02:02.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref] > Dec 11 13:07:38 hotplug kernel: pci 0000:02:02.0: BAR 4: assigned [mem 0xc040004000-0xc040007fff 64bit pref] > Dec 11 13:07:38 hotplug kernel: pci 0000:02:02.0: BAR 1: assigned [mem 0xc1401000-0xc1401fff] > Dec 11 13:07:38 hotplug kernel: pci 0000:02:02.0: BAR 0: assigned [io 0x8040-0x807f] > Dec 11 13:07:38 hotplug kernel: shpchp 0000:01:05.0: PCI bridge to [bus 02] > Dec 11 13:07:38 hotplug kernel: shpchp 0000:01:05.0: bridge window [io 0x8000-0x8fff] > Dec 11 13:07:38 hotplug kernel: shpchp 0000:01:05.0: bridge window [mem 0xc1400000-0xc15fffff] > Dec 11 13:07:38 hotplug kernel: shpchp 0000:01:05.0: bridge window [mem 0xc040000000-0xc05fffffff 64bit pref] > Dec 11 13:07:38 hotplug kernel: virtio-pci 0000:02:02.0: enabling device (0000 -> 0003) > Dec 11 13:07:38 hotplug kernel: scsi host7: Virtio SCSI HBA > Dec 11 13:07:38 hotplug kernel: scsi 7:0:0:1: Direct-Access QEMU QEMU HARDDISK 2.5+ PQ: 0 ANSI: 5 > Dec 11 13:07:38 hotplug kernel: sd 7:0:0:1: Attached scsi generic sg1 type 0 > Dec 11 13:07:38 hotplug kernel: sd 7:0:0:1: Power-on or device reset occurred > Dec 11 13:07:38 hotplug kernel: sd 7:0:0:1: [sdb] 2048 512-byte logical blocks: (1.05 MB/1.00 MiB) > Dec 11 13:07:38 hotplug kernel: sd 7:0:0:1: [sdb] Write Protect is off > Dec 11 13:07:38 hotplug kernel: sd 7:0:0:1: [sdb] Mode Sense: 63 00 00 08 > Dec 11 13:07:38 hotplug kernel: sd 7:0:0:1: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA > Dec 11 13:07:38 hotplug kernel: sd 7:0:0:1: [sdb] Attached SCSI disk Best Regards, Fiona