Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2511207imm; Thu, 27 Sep 2018 14:12:52 -0700 (PDT) X-Google-Smtp-Source: ACcGV60zxsllu+nq5gZ1dwk2diNouVlwO61oMGZ5YlqtMgRZBVwWYavyflQ49PAUgBzGXP8SdWjj X-Received: by 2002:a65:4b88:: with SMTP id t8-v6mr12017696pgq.239.1538082772557; Thu, 27 Sep 2018 14:12:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538082772; cv=none; d=google.com; s=arc-20160816; b=0krmK1jvuTHPDT3zXeEneb1vI9do1eSzahQUGwzbHo3rOAbECtd8GqZ54hMgqRUAGI oss5wqyS/GACqriA/1piI7owtFLcBVSMcXX/BmeQkvKyOF1/ZrQuzwfEFvs8ia6V42Ef VSHy+XWHlPg8C8haXgt5oPJWiN5n8pQgiDZ1WV2yefmfqnJTYcArjmMUoo7UiagCVMU8 k0zJ9LPAmMoLUEBvRZ1siMotn0NQAgqFq8OC2bDdIm201Rue3Eb5YT0ea+G/Nuh+pmUc Z1yQq0mRsMLkkDco5XpxwTQHSaQuw/1zBTA0iUETgH5cYFsg+vzkGHVNV7jr8NGlhm51 06HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature; bh=SwODXDwQomdfAtKdP2Ne3D5Q7Y0J2LonlNvs2G9e7cc=; b=EoKcFzee0PiKaAW/T6ucMRvQFN9TVACgGLhKisTUB6368tfaBkZZZYuoRJyNgRyN4/ HzYcGKB/wudtzalI4Ktznw5ZMbQrSgQydNBueS76hwWL7n3Krf/5orDcJySKcH+aSqSJ L5KMAJgGuvqrOx7sDFYkxQ8FmvSQKERJOk7Z+Rq6A5Cy17B3TN0e5KEbr/lNNVjnZi5l i0KIOq5eu9qTiaojg7nJ0oBVCtfs56XRohYZ09jIzidhT692i4l1NxE7JyM/CBDACmL3 45SkQKZeZ3XjwbUZgeKfk8kP2rG5Mu+eu+GWFknqbA0r/irbIRuuW/i63GmB5LevZ5LJ Bl8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=MiHY2I6p; dkim=pass header.i=@codeaurora.org header.s=default header.b=HUwv2Th0; 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 73-v6si3031731pfv.139.2018.09.27.14.12.34; Thu, 27 Sep 2018 14:12:52 -0700 (PDT) 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=@codeaurora.org header.s=default header.b=MiHY2I6p; dkim=pass header.i=@codeaurora.org header.s=default header.b=HUwv2Th0; 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 S1727421AbeI1DbH (ORCPT + 99 others); Thu, 27 Sep 2018 23:31:07 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:54916 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727295AbeI1DbH (ORCPT ); Thu, 27 Sep 2018 23:31:07 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D5488609A8; Thu, 27 Sep 2018 21:10:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1538082653; bh=U1f7Qo7jJFn2XoIFfYq9zZn4KCmjZdEBrJuyDk/ikOI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=MiHY2I6ps8gl+dYXQwASXCgbQcvel/pp73ZfBOfdUbjXipC5ubX7wxfJeRmBGGgKB ggxMz7/WEXb21cUQ4lBcWgtQ719VgxCH0XT0DKHuJtuIIeP4zbMk71v2vDGSDMivn0 K/SS9YafoxFLPV/PrSMeFaGEepB+SLtmGWiU7whc= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from [10.226.60.82] (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: rruigrok@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9D05C60128; Thu, 27 Sep 2018 21:10:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1538082652; bh=U1f7Qo7jJFn2XoIFfYq9zZn4KCmjZdEBrJuyDk/ikOI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=HUwv2Th05UqM4OBwQaHG1yPgWOkqGPfUhIl5vXlCCYJhea4XOlofJEt63jstijp1A E+Qsg2ShATUmTpB1/PoQ6yy28xiwHocgdSwCSAipSH8B/TxmVrjoJHufIp7nCSEUeM kdZwlU7gsAP9O0ZJfYc4Tm3b9RMs0d/4HTNf/Ezc= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9D05C60128 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=rruigrok@codeaurora.org Subject: Re: [PATCH 00/10] GICv3 support for kexec/kdump on EFI systems To: Marc Zyngier , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Jeffrey Hugo , Thomas Gleixner , Jason Cooper , Jeremy Linton , Ard Biesheuvel References: <20180921195954.21574-1-marc.zyngier@arm.com> From: Richard Ruigrok Message-ID: <44ac1fad-8df4-4738-0f25-8a7a2de8f6df@codeaurora.org> Date: Thu, 27 Sep 2018 15:10:50 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180921195954.21574-1-marc.zyngier@arm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc On 9/21/2018 1:59 PM, Marc Zyngier wrote: > The GICv3 architecture has the remarkable feature that once LPI tables > have been assigned to redistributors and that LPI delivery is enabled, > there is no guarantee that LPIs can be turned off (and most > implementations do not allow it), nor can it be reprogrammed to use > other tables. > > This is a bit of a problem for kexec, where the secondary kernel > completely looses track of the previous allocations. If the secondary > kernel doesn't allocate the tables exactly the same way, no LPIs will > be delivered by the GIC (which continues to use the old tables), and > memory previously allocated for the pending tables will be slowly > corrupted, one bit at a time. > > The workaround for this is based on a series[1] by Ard Biesheuvel, > which adds the required infrastructure for memory reservations to be > passed from one kernel to another using an EFI table. > > This infrastructure is then used to register the allocation of GIC > tables with EFI, and allow the GIC driver to safely reuse the existing > programming if it detects that the tables have been correctly > registered. On non-EFI systems, there is not much we can do. > > This has been tested on a TX2 system both as a host and a guest. I'd > welcome additional testing of different HW. For convenience, I've > stashed a branch containing the whole thing at [2]. I tested [2] from the 4.19-rc4 set which included this series and [1]. Tested kexec on Centriq system with ITS support (46 core).  On-board was a MLX CX5 NIC, verified MSIs are active in /proc/interrupts. Prior to this we used a workaround from Shanker to reuse the same tables in the kexec'ed kernel. Let me know if further testing is needed, and thanks for adding this support. > [1] https://marc.info/?l=linux-efi&m=153754757208163&w=2 > [2] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=irq/gicv3-kdump > > Marc Zyngier (10): > irqchip/gic-v3-its: Change initialization ordering for LPIs > irqchip/gic-v3-its: Consolidate LPI_PENDBASE_SZ usage > irqchip/gic-v3-its: Split property table clearing from allocation > irqchip/gic-v3-its: Move pending table allocation to init time > irqchip/gic-v3-its: Keep track of property table's PA and VA > irqchip/gic-v3-its: Allow use of pre-programmed LPI tables > irqchip/gic-v3-its: Use pre-programmed redistributor tables with kdump > kernels > irqchip/gic-v3-its: Check that all RDs have the same property table > irqchip/gic-v3-its: Register LPI tables with EFI config table > irqchip/gic-v3-its: Allow use of LPI tables in reserved memory > > drivers/irqchip/irq-gic-v3-its.c | 249 ++++++++++++++++++++++------- > drivers/irqchip/irq-gic-v3.c | 20 ++- > include/linux/irqchip/arm-gic-v3.h | 4 +- > 3 files changed, 208 insertions(+), 65 deletions(-) > -- Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.