Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1430246ybl; Thu, 5 Dec 2019 01:03:26 -0800 (PST) X-Google-Smtp-Source: APXvYqwm0D1oWfPYInDQkA9CvE1qwboB3B82HD/dp1KAAPYVvUqBTWyGW7kMGBBdlb7KLWwyd0Nu X-Received: by 2002:a05:6830:232c:: with SMTP id q12mr5568795otg.168.1575536606715; Thu, 05 Dec 2019 01:03:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575536606; cv=none; d=google.com; s=arc-20160816; b=YaQgbtJI7Ag1bP4NAqm/0tS+mOlf9MC7JTGzVnDeBA6Mz+4H9J/Nu4e1g5SUHzKs8W lhtfTmWmMTvQDaot1pl/jfwIOaia4l3zMhNve4itO7fRCylJ2XxpS30zw9AbDTSJCOI4 FrcvOdwA8HG/17pfyofHejeexqWB9zdz6HBzekCej/plJKJg/6tTV72O0mu7WzsQfKW2 WCdGZlsguWvoKwTu5FyEDxM1Tr/MFS9c25fw5N65/LM5KlbB0bstvpfoEf4AyKIFtD2c txyWrS4goylecgZgEfJAIJDIDJSiQquJf2rW1gawLOwv/58RYi53sSTIY7pQy+qXfWyj PRyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=YiPU7eZhK7CRA0Lg9i3js1ionHU7VB1AIPEMZCtLhnY=; b=njovwkg4d8Qa87PAZS4BpvgJC7o4ZyWUBqHjLD0n2siLrQdf4NACrZe/dth/VG/SQb w7/qJwaSxYp/90XVmhEGGjbolOmX10L3UqCGz+rkX1ZQSRWu2VI3OpIULDpTAHGlvM5J YCmhSOpzmvf+3gy0VqImNohqbhJp0JoVo+Ln+1ATe6iD8OTaVU8w3VjQKgzy9Vj2u4il RkyfxEu6duiCzqzh6ReoQg4Wnb6JprDm0LDXQ2UvE0zwwHrCs5CCSdP9PwyWwNfG54XP KGj2prS7IEiLUmBlp/uLBUBRtU1IVYi3z4zI4miCPLIINod6xYEjC1qgk6ljLvEfRSxQ fCfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hOAWg22N; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q22si4915901otm.304.2019.12.05.01.03.14; Thu, 05 Dec 2019 01:03:26 -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; dkim=pass header.i=@kernel.org header.s=default header.b=hOAWg22N; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729022AbfLEJCi (ORCPT + 99 others); Thu, 5 Dec 2019 04:02:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:36078 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726108AbfLEJCi (ORCPT ); Thu, 5 Dec 2019 04:02:38 -0500 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EA035205ED; Thu, 5 Dec 2019 09:02:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575536557; bh=IegRoMB/1Q1fRaPPqw8Gvk6tJnrbo+VYNJkThGWkX78=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hOAWg22NhSCrXMFC8ojXb8dJREu5nEV6aGcQg8f1YrwCh1LW7FM3d72d7RZ+mZHZa /4soWC1ihRSIBsdfmQkz3s0YiLdUpgVzWWRHGdAhRWlyOK4GBRB0jKRiW6Pm6gRBq0 ZKiONXU6Fa+5gEsiYN/wqU8x/gAphf4z8YQjo2fc= Date: Thu, 5 Dec 2019 09:02:32 +0000 From: Will Deacon To: Eric Auger Cc: eric.auger.pro@gmail.com, maz@kernel.org, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu, james.morse@arm.com, andrew.murray@arm.com, suzuki.poulose@arm.com, drjones@redhat.com Subject: Re: [RFC 3/3] KVM: arm64: pmu: Enforce PMEVTYPER evtCount size Message-ID: <20191205090232.GC8606@willie-the-truck> References: <20191204204426.9628-1-eric.auger@redhat.com> <20191204204426.9628-4-eric.auger@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191204204426.9628-4-eric.auger@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 04, 2019 at 09:44:26PM +0100, Eric Auger wrote: > ARMv8.1-PMU supports 16-bit evtCount whereas 8.0 only supports > 10 bits. > > On Seatlle which has an 8.0 PMU implementation, evtCount[15:10] > are not read as 0, as expected. Fix that by applying a mask on > the selected event that depends on the PMU version. Are you sure about that? These bits are RES0 in 8.0 afaict, so this would be a CPU erratum. Have you checked the SDEN document (I haven't)? Will