Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp583318imm; Fri, 28 Sep 2018 03:34:27 -0700 (PDT) X-Google-Smtp-Source: ACcGV61/yj8ulnnn8Wv3zwG5kVdQiTWB4Af3HHfuL5WTUnvDK2HCnJ3q/ofvSVmiGNiOMUEY76kO X-Received: by 2002:a62:6e45:: with SMTP id j66-v6mr11821751pfc.259.1538130867165; Fri, 28 Sep 2018 03:34:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538130867; cv=none; d=google.com; s=arc-20160816; b=opIy1JQRPYRmQKsSjJU22Zha8H40Ikv1aFAlQuZEacadqtJa6lmSAzGt1DCcVzWK2r NYxg/RcSvtYHyN6JHdWxPqYqKHpr5gwxm6pKI/tLI/vugH/rzXMKj3EDFSp+ZD9250MS g+Hmi9MvFhsWxS9NN8nl6HSztNulcyI6JPKamhEzSzYTH3pSDY18ad7jkSTnU6tnp1FP Op9AMJv7ZvXCMIdLMK7Egfp0DDbrJyCqPzBtGhhRc52BZvG+6yJrHjixSFSim+FtZXKV xPEBfNxmxtTqFu9Jeqil4oWTjSIk4BDpb79js+SlWMv+dqyKKLldrzD2EiIfFXaf4NqK TWDg== 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:organization:from:references:cc:to:subject; bh=0GpzuSy614eKq3Sgtc34IDqHHim9xJhY/BjOk7YHHro=; b=NWD3V0A3BhhLkkacFyrNVZ/CHiic1sOSkF71UoFkuVaRlEH2g5DnBGndz4mbBHGN+d 5aSTUxzAYNvTT2uwj43+LzwSgtWFjR549CPuP0EfogqBZeGFGVqFweSCAZu/smolZzx9 nbQxz4IPGIL4goI6rU5Hc2lhOdDE3fyj95mtqEywTSm5Xrl+nxPid3Slob1n2AosWRgT UL6AHscbI7hmRBHOPN562qduAcGfM05UAPvjFlbisXStD2+0fiRcnHma915mLdSzFUqj vupcfHCJMhXmBdtypZ2+A+RXdfOtYpgixIjjLrypjVv9fNHx3zKnJOaa9O8abz9WL6R3 0BNg== 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 18-v6si4420584pgx.173.2018.09.28.03.34.10; Fri, 28 Sep 2018 03:34:27 -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 S1729359AbeI1Q46 (ORCPT + 99 others); Fri, 28 Sep 2018 12:56:58 -0400 Received: from foss.arm.com ([217.140.101.70]:46680 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729251AbeI1Q46 (ORCPT ); Fri, 28 Sep 2018 12:56:58 -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 528DD1596; Fri, 28 Sep 2018 03:33:51 -0700 (PDT) Received: from [10.4.13.85] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E384A3F5BD; Fri, 28 Sep 2018 03:33:49 -0700 (PDT) Subject: Re: [PATCH 00/10] GICv3 support for kexec/kdump on EFI systems To: Richard Ruigrok , 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> <44ac1fad-8df4-4738-0f25-8a7a2de8f6df@codeaurora.org> From: Marc Zyngier Organization: ARM Ltd Message-ID: <911a666a-9f11-5c23-77a4-658afba02644@arm.com> Date: Fri, 28 Sep 2018 11:33:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <44ac1fad-8df4-4738-0f25-8a7a2de8f6df@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Richard, On 27/09/18 22:10, Richard Ruigrok wrote: > 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. Yes, I remember seeing this workaround. Hopefully we're in a better place now that we can guarantee that the tables are not reused. > Let me know if further testing is needed, and thanks for adding this support. Good to know, thanks for having tested it. I've now put this code into -next for some more soaking. Hopefully nothing horrible will happen ;-) M. -- Jazz is not dead. It just smells funny...