Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4724084pxj; Tue, 8 Jun 2021 23:44:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSgHgnNvSM+xdipGXv1RPe2xa0hCw039v/GK3L6nxDSv5b8pqeo4EE/za2OZhHN6VprwEW X-Received: by 2002:a17:906:6d51:: with SMTP id a17mr27132415ejt.543.1623221078531; Tue, 08 Jun 2021 23:44:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623221078; cv=none; d=google.com; s=arc-20160816; b=dCFwx+3K3Je0S4q7ltEGdszw6Y7Hzptfo+TcvOZT/0gLVGbLU+G3gk1fbG5QOOgk18 LyhwG4lqvmqQJjPsEFV24G/PadZYX8q9jzc4h6xwb+aOVwD/2BfJCbcguvTJ6+YOysIO vOSDGL5kEpwI3iIlTqY4PFSxWRu5kv/CwfKdVtCWnK/B59ExgGJKgWTYdVhvZ2MjhqTK plfHKKpp9lQgR/rqQE0O4qQ0kpW1pK9aiJWKOCljbS07DQDoL1Mn3Kuq1vSd8dWfxn4p +hzScZSO727OlLuIs4RH82jCiHNB0594dOprTTspgPN+KJFS+oszey1VDcaA3F5wVJJs L2aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=1XkscAZLRAuwlyEYdHSq01evi+XlZIqFeexAEdMd/Io=; b=at93oJiTuFI0UkKzq5Mk1J1MyBIPmKCwwunHYGhKOLM0IMhaZ9wf+idX8DkGNXL6j2 QR6mbsynSSzjtk0zEurJznQYnhiLXRA18zveV2IEpugpydtvATG3F21z+9Ypx5rD/M6W UjE3nXUz6YhH/c/jyairlALGBkYKcv+A0sej7aZPyqRvOpNw2JG+E3r5tnexFvTfM9Lw NEqaz51rDW0p4OBf6uCj8GYAAzvMKBvp+57ar+l/7vByTU9jdbhvDthRXnJcJhm2WUbP uU4E/wEe1TSs32gA0JAE/h8gGBh8Brslg+s9Q3WC6bqQFEbl8ps5gSERTFJY5UovREZ8 9Ldw== 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j5si1631774eds.204.2021.06.08.23.44.15; Tue, 08 Jun 2021 23:44:38 -0700 (PDT) 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234007AbhFHSAz (ORCPT + 99 others); Tue, 8 Jun 2021 14:00:55 -0400 Received: from foss.arm.com ([217.140.110.172]:36724 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233983AbhFHSAv (ORCPT ); Tue, 8 Jun 2021 14:00:51 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A908FD6E; Tue, 8 Jun 2021 10:58:57 -0700 (PDT) Received: from lpieralisi (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8B18A3F694; Tue, 8 Jun 2021 10:58:56 -0700 (PDT) Date: Tue, 8 Jun 2021 18:58:47 +0100 From: Lorenzo Pieralisi To: Marc Zyngier Cc: Valentin Schneider , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Thomas Gleixner , Vincenzo Frascino , Mark Rutland , sudeep.holla@arm.com Subject: Re: [RFC PATCH v2 00/10] irqchip/irq-gic: Optimize masking by leveraging EOImode=1 Message-ID: <20210608175840.GA15997@lpieralisi> References: <20210525173255.620606-1-valentin.schneider@arm.com> <87zgwgs9x0.wl-maz@kernel.org> <87tumhg9vm.mognet@arm.com> <87a6o0z86t.wl-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87a6o0z86t.wl-maz@kernel.org> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [+Sudeep] On Tue, Jun 08, 2021 at 04:29:14PM +0100, Marc Zyngier wrote: > [+Mark, since we discussed about this on IRC] > > Hi Valentin, > > On Tue, 01 Jun 2021 11:25:01 +0100, > Valentin Schneider wrote: > > > > On 27/05/21 12:17, Marc Zyngier wrote: > > > On Tue, 25 May 2021 18:32:45 +0100, > > > Valentin Schneider wrote: > > >> I've tested this on my Ampere eMAG, which uncovered "fun" interactions with > > >> the MSI domains. Did the same trick as the Juno with the pl011. > > >> > > >> pNMIs cause said eMAG to freeze, but that's true even without my patches. I > > >> did try them out under QEMU+KVM and that looked fine, although that means I > > >> only got to test EOImode=0. I'll try to dig into this when I get some more > > >> cycles. > > > > > > That's interesting/worrying. As far as I remember, this machine uses > > > GIC500, which is a well known quantity. If pNMIs are causing issues, > > > that'd probably be a CPU interface problem. Can you elaborate on how > > > you tried to test that part? Just using the below benchmark? > > > > > > > Not even that, it would hang somewhere at boot. Julien suggested offline > > that it might be a problem with the secondaries' PMR initial value, but I > > really never got to do dig into it. > > I just hit a similar problem on an Altra box, which seems to be > related to using PSCI for idle. PSCI has no idea about priority > masking, and enters CPU suspend with interrupt masked at the PMR > level. Good luck waking up from that. Gah. If we can manage to understand which path in psci_cpu_suspend_enter() is causing this problem that'd be great too (it can be both, for different reasons): if (!psci_power_state_loses_context(state)) (1) ret = psci_ops.cpu_suspend(state, 0); else (2) ret = cpu_suspend(state, psci_suspend_finisher); I'd like to understand if the problem is on idle entry or exit (or both depending on the state we are entering). On (1) we would return from the call with the CPU state retained on (2) with CPU context restored (but it rebooted from reset - so the PMR value is gone). I am asking about (2) because I am trying to understand what the power controller does wrt PMR and wake-up IRQs (ie and whether the PMR plays a role in that). Reworded: trying to understand how the PMR behaviour is playing with the power controller wake-up capabilities. Thoughts appreciated. I am sorry that you had to debug this, thank you for that. Lorenzo > I've pushed a test branch at [1]. It'd be really good if you could > have a quick look and let me know if that helps in your case (it > certainly does on the box I have access to). > > Thanks, > > M. > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=arm64/nmi-idle > > -- > Without deviation from the norm, progress is not possible.