Received: by 10.223.185.111 with SMTP id b44csp142267wrg; Fri, 9 Mar 2018 02:35:10 -0800 (PST) X-Google-Smtp-Source: AG47ELtjgdO6Zn9w/dAmUcAE+pDBFJu1L9i7Ryhyef2D0ovLDGOBT9wWitKsgcyIxnokfAGyOQMV X-Received: by 2002:a17:902:7e0d:: with SMTP id b13-v6mr26952606plm.97.1520591710471; Fri, 09 Mar 2018 02:35:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520591710; cv=none; d=google.com; s=arc-20160816; b=Dl0gJXSG0zkvNRKE5Kom+xWFT9+8IXH/+2vvAbPzcASfXj0Lz3LfX9CZOC0sonLC8e XAst1P/6/KpKG+MwqbwskKw7dIY+sjb+7sAKtujXSf0xqLPmRjts7dtqdSkRi0Ifv3Fc WnA2gcpHukHXXD/EJnOvM6ZVgxjYo2qR6bJ0I5FU6gpxMRSR/kjrXngGdl7DLsEW6HRh yXpOVhf08wkb21gdNqlMpXoUyKvZSY5+PNsb8rYBYkDybbn+MFHEM/rQY2gGrak66pJi Z+RW6QzKIuEK8kdJn6zUNonX7i2XcpP3Gn43Xe3k16aqpk2FXWk4oP4vuOlGvkz4Tbvx Iuhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=+4Vf6R/oiKUpH/WAgsvR6+eApCJyo/VAMQbri7xcsBs=; b=YrIVyj0t7psFHTM9OGLaUpSqZj/sC+Fqv1YKsueILwbADdEOC09vXf1pii1UoSAtuM f+/28ih+D0xzDYq0ieQipQqJAjLcfRe/9sTO59OJM2UUYdOVG5TNrpm/bVMPK/b02n5H 1oilavS2nM59KruTCzaRuBvHfjWvK0JYFv6U8yiZjvbGq/rzrZxRIZKk8OXbE8cFEihW BXOJf7X/1q2RrXLP1TD+OWTubjEYHUFDXHyk7JgD+qBnd93UvsUwZWkxWoYKpehPLXb3 u6wRS91y9kJkEpCG8iPFg1lqBMaeHQtEEASxXu2xLBRiAhEqQXSyQEbnPP7nMIWmOBbg fy6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=Pkb3rnYt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1-v6si650566pld.259.2018.03.09.02.34.53; Fri, 09 Mar 2018 02:35:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=Pkb3rnYt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751113AbeCIKd6 (ORCPT + 99 others); Fri, 9 Mar 2018 05:33:58 -0500 Received: from mail-pg0-f54.google.com ([74.125.83.54]:37214 "EHLO mail-pg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750939AbeCIKd5 (ORCPT ); Fri, 9 Mar 2018 05:33:57 -0500 Received: by mail-pg0-f54.google.com with SMTP id y26so3397142pgv.4 for ; Fri, 09 Mar 2018 02:33:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+4Vf6R/oiKUpH/WAgsvR6+eApCJyo/VAMQbri7xcsBs=; b=Pkb3rnYt/fKOU48GLjvpOexDgpIPtETpIIWweyNfQWPqaUD1XqS3UTpdUHveZUxiil nYLI/Y9XFvKD8ik5mfGB0nni2pcv7xivmakTYwu4x5XgNCTBCrJGkBVmw8XBO89ub25o 3oF5YVOpmDSYOeU3BHUoTmowRNqIsAx4fgSC0wiXKK9mecN+iALKyTzIb20/N+ocW+2K SGyeOv3p85sqNcwh5ioKjYfdy2h32JqdHox3Xs2Bm7pxQTaZRV/UPt8cFm2qEKycbQ3g A/B18z8BUIFpDCuFNVdFnG9Jcf0PsSDr2IbqAq7K/I1bxHVzLnNd4CI5Wwsa06J3zjTz ts8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+4Vf6R/oiKUpH/WAgsvR6+eApCJyo/VAMQbri7xcsBs=; b=JBGxk2utWRvhWqa+tkBDCW7G9qCqkHsjw8VwDO11/4Okm/j6jMkGjT28pmQ8lL+9/7 W0kqJcz23HVnNo+gfY2iS67cpjGDMfH08mDhGNL02RAGesu/uY7ZbCJkDeaSrcvLAzUM 91h3q+J0NoiDkAHbnxDO3ifiEAYuB5kzcMFnPBdeHtETZxz4I9rgTwBOjZYjigzpCS6+ yCeYZkM17p3QnO20VCZux+c6/686VloaProwTBrBSkESqoqPZI/ZLKSKhWtEoT3vW45Q DaPFYg7V3FAgLB57mADNVFj1D2WGDcdcXRI2pKj8u2tKy/RB15C0Afo7CXC68uU7lsBx d9ag== X-Gm-Message-State: APf1xPCAoIiE7y+3zpefDc7QMDtrVxZYtlR5kADc82gMwP2k7ni/z7uB 8sQ2iiew3vyu+fy9l5uQo1Po5E8XdG3GdsuuVKxmqw== X-Received: by 10.98.206.1 with SMTP id y1mr29594648pfg.196.1520591636766; Fri, 09 Mar 2018 02:33:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.236.140.148 with HTTP; Fri, 9 Mar 2018 02:33:55 -0800 (PST) In-Reply-To: <9a709b76-1b45-8250-9d8e-adbad59a43cc@arm.com> References: <1519837260-30662-1-git-send-email-jaz@semihalf.com> <20180228171647.6t4dabntujcb5kon@lakrids.cambridge.arm.com> <9a709b76-1b45-8250-9d8e-adbad59a43cc@arm.com> From: Grzegorz Jaszczyk Date: Fri, 9 Mar 2018 11:33:55 +0100 Message-ID: Subject: Re: [PATCH] arm64: kdump: fix interrupt handling done during machine_crash_shutdown To: Marc Zyngier Cc: Mark Rutland , catalin.marinas@arm.com, will.deacon@arm.com, james.morse@arm.com, "AKASHI, Takahiro" , Hoeun Ryu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Nadav Haklai , Marcin Wojtas Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Not using EOImode==1 is definitely an oddity (at least on the host), but > that doesn't mean it shouldn't work. > > The reason the thing is hanging is that although we correctly deactivate > the interrupt, nothing performs the priority drop. Your write to EOI > helps in the sense that it guarantees that both priority drop and > deactivate are done with the same operation, but that's not something > we'd want to expose. > > My preferred approach would be to nuke the active priority registers at > boot time, as the CPUs come up. I'll try to write something this week. I've made a PoC which performs priority drop at boot time as you suggested and it works with both GICv2 and GICv3 but I see some problem: It seems that the only way to drop the priority is to perform write to EOI register (the GIC_RPR is RO). According to GIC documentation a write to EOI register must correspond to the most recent valid read from IAR. The problem is that the interrupt was already acked in the 'original' kernel, so reading GICC_IAR in crashdump kernel returns spurious interrupt and it seems that there is no way to figure out appropriate irqnr for EOI write. Nevertheless I've observed that choosing random irqnr for EOI write works fine (maybe because all interrupts in Linux uses the same priority?). Here is the PoC (not ready for submission only for further discussion): https://pastebin.com/gLYNuRiZ Looking forward to your feedback. Thank you in advance, Grzegorz