Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3270748imu; Mon, 28 Jan 2019 01:43:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN7tIrA3O4y/8Eqqxfqj3aciyyHpGgrPVS+EXNlLIVwPcQ6X9BUjAd3hiHB6nkuPgPwdZY+x X-Received: by 2002:a62:6047:: with SMTP id u68mr20881909pfb.239.1548668605169; Mon, 28 Jan 2019 01:43:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548668605; cv=none; d=google.com; s=arc-20160816; b=fi2BCECKX7UWTHWdUjWf7Gn3ae4t8JVBnILodVftjhY9ZFHxO5A8bChpRbpBYODnmX ef2/nWeyNfo+A/3hKrQ0NK883ICYktoJXDx9LW+gn+HJv9B7NT8rEymE+n0p2pJM4x6r xctAReNhNh3T7uhoGAnk6+Ole8bDrw9ERVLaLefyOFhd+bwZO4yIYHJe417DY88Jq3rs ss7cBYq9SPSPH+fPYTY3aObuLV2RcUPIIt+0Y0clQJ+swZOoRFOSeCA3rFN2KDxbPIHV 31hh7Ro+tX9e9ReH1M1kLI9ARqaoHFWuM9JiIOSMaxDKU/qVM9bJGKUh3/b5kecDH9hF yMQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:user-agent :references:in-reply-to:subject:cc:to:from:message-id:date; bh=J0DhUJ+zUlbfjiE79/KQI5E6hqCczgkOJ70AB9yzs7U=; b=o6wn0SHPVSEHsmKTjCyaGJKRpfKXDI+uB6GanMDtcIhlwmksDvYc161xETW7E467hj Ee8UDCbIGS5tUn/MTh8ghwp9Oi7K15Y4YzkaN0MWxQ9rnAkJa9lFIG+fxIu4YA9PpXh9 Rtl2bB6AHGcvbDCKM81+IA+cm7NH1oEncbdm18UG0GTaeSqKf5yyORCDT54TB8+vf3kh MsrZWvGxSfXgajOWyCDp8jGjCvG11HCxWsy0ffFWcoweY7Qbre/mIdpjpgzBpAaJ68om EPBQcg6nqedf/GBbGD5RC5i+hyy/4qYqaaDXp0c/hmIEHEyych2b2Xyy2Ap+wR7brxyb P1bg== 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 36si34673288plc.300.2019.01.28.01.43.09; Mon, 28 Jan 2019 01:43:25 -0800 (PST) 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 S1726683AbfA1Jm0 (ORCPT + 99 others); Mon, 28 Jan 2019 04:42:26 -0500 Received: from foss.arm.com ([217.140.101.70]:42182 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726415AbfA1Jm0 (ORCPT ); Mon, 28 Jan 2019 04:42:26 -0500 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 CB342EBD; Mon, 28 Jan 2019 01:42:25 -0800 (PST) Received: from big-swifty.misterjones.org (big-swifty.cambridge.arm.com [10.1.39.122]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DF0443F589; Mon, 28 Jan 2019 01:42:22 -0800 (PST) Date: Mon, 28 Jan 2019 09:42:21 +0000 Message-ID: <86d0ohw22q.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Julien Thierry Cc: , , , , , , , , , Oleg Nesterov , Dave Martin Subject: Re: [PATCH v9 08/26] arm64: Make PMR part of task context In-Reply-To: <1548084825-8803-9-git-send-email-julien.thierry@arm.com> References: <1548084825-8803-1-git-send-email-julien.thierry@arm.com> <1548084825-8803-9-git-send-email-julien.thierry@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 21 Jan 2019 15:33:27 +0000, Julien Thierry wrote: > > In order to replace PSR.I interrupt disabling/enabling with ICC_PMR_EL1 > interrupt masking, ICC_PMR_EL1 needs to be saved/restored when > taking/returning from an exception. This mimics the way hardware saves > and restores PSR.I bit in spsr_el1 for exceptions and ERET. > > Add PMR to the registers to save in the pt_regs struct upon kernel entry, > and restore it before ERET. Also, initialize it to a sane value when > creating new tasks. > > Signed-off-by: Julien Thierry > Reviewed-by: Catalin Marinas > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Oleg Nesterov > Cc: Dave Martin Reviewed-by: Marc Zyngier M. -- Jazz is not dead, it just smell funny.