Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp8217995pxb; Fri, 19 Feb 2021 10:12:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJywKF+neYNEJuYIIG3qlclmTkA07wA07mGTTHtkQygQtE0rLGNogGBuqxZdQuA4I4ATK5WM X-Received: by 2002:a17:906:1d0f:: with SMTP id n15mr9891961ejh.553.1613758358051; Fri, 19 Feb 2021 10:12:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613758358; cv=none; d=google.com; s=arc-20160816; b=GC1Od6lcRCcebLClzM1LQvgrtgAXDEF+OesW9p///9yBzE5KckBvnF/Y/IKIw3C8FQ Lma3zsUw+WxbXcIEHIdFdRvKy+O9y/29ZA5q1f9wypAUNJd2vp4HsYAsEic8O8eIqozH UIC8ZPfrv5zZx5cGMBbcWSOxtUpNXUSqyZ9Y552QVioH6aX5Hg1BMKvetDb/Dylp9cK7 T1PnJOQhcORdcxg47HLtFOO7Xg/bcrwmVAx8KwMg6QA5xqbNRxvQveL7+JTe6khcgAXg nKOAspCWtLcmGtNrMoyyHF8G9YOklxLv3VC1YEQt6JUQKTSitIhtSqHzdnccG6E/VNyL WAgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date; bh=0auO23H1QjGVhFGd6nyR7yxCrLe0nKPkWL+Z77+MuSA=; b=f6rNi6ok8nMKIszJrwVP9A++gccnkfN9ziJpXoEZuYy7oHX3QzI9iNdzj+kaDVnD3g KdwY/WG8mDA140G29tZDu4wE980OpEWtYxEtv9P+yqVM/5A4PBHL4yjE7tGkt3EzKb4v SIBtAcUdreVWNTkcnboYCDuLLbUDfOWoIHI6G2Ibdi4yiHpv9whMlcx3Xs4rop2iS92z rtyV+ybZXRLcD/G9m2xZsJiK896iOCKfaujfAoi73IfbQIBbdN4PLzScQxqzoDsmJVUN OQs9Kk4PnIFy0wutYpZT0UCo3UtkzoGwK2DeN4/g8xqr85WyGCgJKjqMYV3ZqnFJcSMO qFeg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bs11si6345527ejb.637.2021.02.19.10.12.14; Fri, 19 Feb 2021 10:12:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229808AbhBSSLo (ORCPT + 99 others); Fri, 19 Feb 2021 13:11:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:43706 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229607AbhBSSLm (ORCPT ); Fri, 19 Feb 2021 13:11:42 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3CA1164E44; Fri, 19 Feb 2021 18:11:01 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lDAF1-00EydH-0E; Fri, 19 Feb 2021 18:10:59 +0000 Date: Fri, 19 Feb 2021 18:10:56 +0000 Message-ID: <87a6s0orm7.wl-maz@kernel.org> From: Marc Zyngier To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, james.morse@arm.com, marcan@marcan.st, tglx@linutronix.de, will@kernel.org Subject: Re: [PATCH 0/8] arm64: Support FIQ controller registration In-Reply-To: <20210219113904.41736-1-mark.rutland@arm.com> References: <20210219113904.41736-1-mark.rutland@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, james.morse@arm.com, marcan@marcan.st, tglx@linutronix.de, will@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mark, On Fri, 19 Feb 2021 11:38:56 +0000, Mark Rutland wrote: > > Hector's M1 support series [1] shows that some platforms have critical > interrupts wired to FIQ, and to support these platforms we need to support > handling FIQ exceptions. Other contemporary platforms don't use FIQ (since e.g. > this is usually routed to EL3), and as we never expect to take an FIQ, we have > the FIQ vector cause a panic. > > Since the use of FIQ is a platform integration detail (which can differ across > bare-metal and virtualized environments), we need be able to explicitly opt-in > to handling FIQs while retaining the existing behaviour otherwise. This series > adds a new set_handle_fiq() hook so that the FIQ controller can do so, and > where no controller is registered the default handler will panic(). For > consistency the set_handle_irq() code is made to do the same. > > The first couple of patches are from Marc's irq/drop-generic_irq_multi_handler > branch [2] on kernel.org, and clean up CONFIG_GENERIC_IRQ_MULTI_HANDLER usage. > The next four patches move arm64 over to a local set_handle_irq() > implementation, which is written to share code with a set_handle_fiq() function > in the last two patches. The only functional difference here is that if an IRQ > is somehow taken prior to set_handle_irq() the default handler will directly > panic() rather than the vector branching to NULL. > > The penultimate patch is cherry-picked from the v2 M1 series, and as per > discussion there [3] will need a few additional fixups. I've included it for > now as the DAIF.IF alignment is necessary for the FIQ exception handling added > in the final patch. > > The final patch adds the low-level FIQ exception handling and registration > mechanism atop the prior rework. Thanks for putting this together. I have an extra patch on top of this series[1] that prevents the kernel from catching fire if a FIQ fires whilst running a guest. Nothing urgent, we can queue it at a later time. Thanks, M. [1] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=irq/fiq -- Without deviation from the norm, progress is not possible.