Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4127570imm; Tue, 25 Sep 2018 11:49:21 -0700 (PDT) X-Google-Smtp-Source: ACcGV63ot9zw5ObLyjv2RiO+esDkAXMIiOEr6aURzonBYVVA7beWvZ9lMBDd4B/llvw93ZYfbT0i X-Received: by 2002:a63:d154:: with SMTP id c20-v6mr2248938pgj.188.1537901361193; Tue, 25 Sep 2018 11:49:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537901361; cv=none; d=google.com; s=arc-20160816; b=TN1VkNfIV6bVhqMTS/KWDB08egFIKK6mgTuncekDPCeStVk8gQy4guL3MPTAEACwnY An1/uBdvr+Gm5eqXsNJ9INuZm5E+AzKJ7uRHYBnOec/w2vGsjRT/SDhe0QCyRA0cdGjt CyWRq5rP7KxqCZGehYieaZoq/oGleyH1X2G6A260lY98s5facBV/Mu8qd1nQxFmQJQo7 pVwVKzKUGh5h3RdXZvZeal2nT3MUZ8it0y8XdOlSi2/7+cHcWCowQfUlf+xDzt9faEGy ZM2aOp0CcnNj0ItHxTWVXQUYC3lSH+w5UmjZPK7ph9P4VVLfp4zu+0P3EefbuulkFVxI LHtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=1i8CYGHKG26CGyLKUvVaGBGJ2xq0fW4xVNku3GjKp1U=; b=ckE41EHp/g8sEHLec8quNayNFgRaiTPdOl7itW6wNQfati/Z2QqCsptJrAvLTQYGMe woi5ktWK+PKIORphM6TatyHoS/4dRTEqOqdAn6Whp563JabvZ9z0Xmx7esEqLA4/CqBY aDk2ecb29nozA50l9xKaGAoQq7sp29vnK29ejaQFl5cZ2+QtUnLEuO4ZtTUEz1kN9CzD zabatp7i5OiaCdzSOSIQQoQ6NwtdbioXA6oNNYcfLctwJq4tqfouCgNXcSGdiu/p5Zz4 jh42zOKuTgJof/lNoIFuvI7GadPItzboeilrTpkIxKDq+29YyrsfTBpVP6CVfN9CMN/V Um+w== ARC-Authentication-Results: i=1; mx.google.com; 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 72-v6si2876337pfq.6.2018.09.25.11.49.05; Tue, 25 Sep 2018 11:49:21 -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; 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 S1727418AbeIZA5o (ORCPT + 99 others); Tue, 25 Sep 2018 20:57:44 -0400 Received: from foss.arm.com ([217.140.101.70]:57100 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726944AbeIZA5o (ORCPT ); Tue, 25 Sep 2018 20:57:44 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8CE80ED1; Tue, 25 Sep 2018 11:48:51 -0700 (PDT) Received: from [192.168.100.242] (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2132C3F5D3; Tue, 25 Sep 2018 11:48:51 -0700 (PDT) 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: Ard Biesheuvel , Jeffrey Hugo , Thomas Gleixner , Jason Cooper References: <20180921195954.21574-1-marc.zyngier@arm.com> From: Jeremy Linton Message-ID: <815a32a5-483c-576c-8483-54042a84d5bd@arm.com> Date: Tue, 25 Sep 2018 13:48:50 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180921195954.21574-1-marc.zyngier@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 09/21/2018 02: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]. When combined with Ard's patch set, this fixes kdump on a QC machine. Tested-by: Jeremy Linton Thanks, > > [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(-) >