Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39CD9C433EF for ; Mon, 15 Nov 2021 07:45:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2116063211 for ; Mon, 15 Nov 2021 07:45:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229815AbhKOHso (ORCPT ); Mon, 15 Nov 2021 02:48:44 -0500 Received: from bmailout1.hostsharing.net ([83.223.95.100]:53963 "EHLO bmailout1.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229707AbhKOHsn (ORCPT ); Mon, 15 Nov 2021 02:48:43 -0500 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS DV RSA Mixed SHA256 2020 CA-1" (verified OK)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id E79CC30000649; Mon, 15 Nov 2021 08:45:42 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id DACF4FEC4B; Mon, 15 Nov 2021 08:45:42 +0100 (CET) Date: Mon, 15 Nov 2021 08:45:42 +0100 From: Lukas Wunner To: "Michael S. Tsirkin" Cc: Gerd Hoffmann , linux-pci@vger.kernel.org, Bjorn Helgaas , open list Subject: Re: [PATCH] pciehp: fast unplug for virtual machines Message-ID: <20211115074542.GA24942@wunner.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211114173550-mutt-send-email-mst@kernel.org> <20211114122249-mutt-send-email-mst@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 14, 2021 at 05:37:15PM -0500, Michael S. Tsirkin wrote: > On Sun, Nov 14, 2021 at 07:06:04PM +0100, Lukas Wunner wrote: > > Why don't you just trigger surprise-removal from outside the guest? > > Because linux does not handle it well for all devices. Fixing that > requires fixing all drivers. Please expose surprise removal in addition to the Attention Button to avoid perpetuating this situation. Teach users to use that for devices whose drivers already support it well and fall back to the Attention Button only for those that don't. macOS and Windows support surprise-removal of most hardware well. We've made a lot of progress in that area (AMD for one has been working on surprise removal of GPUs). It's an embarrassment if contortions such as abusing the Attention Button are needed just because surprise removal doesn't work for everything. I'd like to see engineering resources spent on fixing surprise removal for drivers that are relevant for you, rather than implementing workarounds such as this one. Thanks, Lukas