From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: [PATCH 0/2] arm64: PMU: Sanitize usage of PMSELR_EL0.SEL Date: Fri, 2 Dec 2016 15:50:57 +0000 Message-ID: <1480693859-27249-1-git-send-email-marc.zyngier@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id B785640822 for ; Fri, 2 Dec 2016 10:50:29 -0500 (EST) Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PGD7Fo+zurL6 for ; Fri, 2 Dec 2016 10:50:28 -0500 (EST) Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 5E57140796 for ; Fri, 2 Dec 2016 10:50:28 -0500 (EST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu To: Will Deacon , Mark Rutland Cc: Itaru Kitayama , Catalin Marinas , Hoan Tran , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, Tai Tri Nguyen List-Id: kvmarm@lists.cs.columbia.edu An ugly interaction between the use of PMSELR_EL0 in a host kernel and the use of PMXEVCNTR_EL0 in a guest has recently come to light [1], leading to the guest taking an UNDEF exception in EL1 when using the PMU. The fix is pretty simple ("don't do that!"), making the PMU useable on X-Gene, which seems to have a stricter (but nonetheless valid) interpretation of the architecture. Patches against 4.9-rc6. [1] https://lists.cs.columbia.edu/pipermail/kvmarm/2016-November/022545.html Marc Zyngier (2): arm64: PMU: Do not use PMSELR_EL0 to access PMCCFILTR_EL0 arm64: PMU: Reset PMSELR_EL0 to a sane value at boot time arch/arm64/kernel/perf_event.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) -- 2.1.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: marc.zyngier@arm.com (Marc Zyngier) Date: Fri, 2 Dec 2016 15:50:57 +0000 Subject: [PATCH 0/2] arm64: PMU: Sanitize usage of PMSELR_EL0.SEL Message-ID: <1480693859-27249-1-git-send-email-marc.zyngier@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org An ugly interaction between the use of PMSELR_EL0 in a host kernel and the use of PMXEVCNTR_EL0 in a guest has recently come to light [1], leading to the guest taking an UNDEF exception in EL1 when using the PMU. The fix is pretty simple ("don't do that!"), making the PMU useable on X-Gene, which seems to have a stricter (but nonetheless valid) interpretation of the architecture. Patches against 4.9-rc6. [1] https://lists.cs.columbia.edu/pipermail/kvmarm/2016-November/022545.html Marc Zyngier (2): arm64: PMU: Do not use PMSELR_EL0 to access PMCCFILTR_EL0 arm64: PMU: Reset PMSELR_EL0 to a sane value at boot time arch/arm64/kernel/perf_event.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) -- 2.1.4