Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5EBADC433DF for ; Thu, 28 May 2020 13:27:12 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DCC54207F5 for ; Thu, 28 May 2020 13:27:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="TuSZ0xgX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DCC54207F5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49XpQP58sdzDqZw for ; Thu, 28 May 2020 23:27:09 +1000 (AEST) Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 49XpMX22YMzDqPC for ; Thu, 28 May 2020 23:24:40 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=TuSZ0xgX; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 49XpMW4LDgz9sRY; Thu, 28 May 2020 23:24:39 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1590672279; bh=VKVDfa2X863vPRw5hAs7Yw+qYWIyIvLSR/9FUguLunk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=TuSZ0xgXLU6Oq+Qu5TlKhGeOYnooWDW6xQBYST3VRNDGhAJc83fFEOyFIEphz+Y0E rSUT3ZjCadWzrI40kkoCx2o6E4nv8YQIsgze5AMqPyShn6FUxGtZuouFAZVP3mDKk5 AhU8jIanBx3NwUX/ID6Qx9Oj2IncROR8yzttWR5razwTMnUb1AfmsokxB6uoCj0IVG b5YSptSwe34gQQhOOgPCXorfFpnyYXDdgEYAO1RKiXZIUOPQC78Z5PRB6CRX1/HENh v9I5rjSBPugifqzsY4GmYgq9n3NINfar7FdX1cndqoyG2FFbWPPuwb8wYN8H89DiWl g9mMlTzNoc9Vw== From: Michael Ellerman To: =?utf-8?Q?C=C3=A9dric?= Le Goater Subject: Re: [PATCH 2/3] powerpc/pci: unmap legacy INTx interrupts of passthrough IO adapters In-Reply-To: <44126659-0490-4466-7f08-1726a7f0ce6e@kaod.org> References: <20200429075122.1216388-1-clg@kaod.org> <20200429075122.1216388-3-clg@kaod.org> <44126659-0490-4466-7f08-1726a7f0ce6e@kaod.org> Date: Thu, 28 May 2020 23:25:03 +1000 Message-ID: <874ks0jiog.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Oliver O'Halloran , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" C=C3=A9dric Le Goater writes: > On 4/29/20 9:51 AM, C=C3=A9dric Le Goater wrote: >> When a passthrough IO adapter is removed from a pseries machine using >> hash MMU and the XIVE interrupt mode, the POWER hypervisor, pHyp, >> expects the guest OS to have cleared all page table entries related to >> the adapter. If some are still present, the RTAS call which isolates >> the PCI slot returns error 9001 "valid outstanding translations" and >> the removal of the IO adapter fails. >>=20 >> INTx interrupt numbers need special care because Linux maps the >> interrupts automatically in the Linux interrupt number space if they >> are presented in the device tree node describing the IO adapter. These >> interrupts are not un-mapped automatically and in case of an hot-plug >> adapter, the PCI hot-plug layer needs to handle the cleanup to make >> sure that all the page table entries of the XIVE ESB pages are >> cleared. > > It seems this patch needs more digging to make sure we are handling > the IRQ unmapping in the correct PCI handler. Could you please keep > it back for the moment ?=20 Yep no worries. cheers