Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1460072ybl; Thu, 5 Dec 2019 01:38:17 -0800 (PST) X-Google-Smtp-Source: APXvYqzZPTVHJGNSOBejdvk6si5PdxhSUt9gAjGW7oedZulmZJVhTc9q8bL2m9R74QMvOQAbN9aj X-Received: by 2002:aca:de88:: with SMTP id v130mr6493632oig.108.1575538697858; Thu, 05 Dec 2019 01:38:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575538697; cv=none; d=google.com; s=arc-20160816; b=uLUF/tS5Yj+JwxtHY7JnAd/6Gys9sRAjMq4THCfijcpPmkUhkm3HpMzxueufk/Dhag NTk/YwP7HsgOedAO0sQl9sEi8urF7+zYam8wZRGFN2HlvgClFHL1MeWijPktvWBJZ+7B igqjjDLnafs7Nkmjpz5Aq/DiCS8SLkrdeUD+P5tk5ozRvDuUwsgSu5Hb0HfanT0idR2O W/XtXMidGt7/ELiTa3KySmXsWJE2LJ4Apd4zfcoB+87AoDH+etqvm1qVRVJXy6v9BINL a65/ITSg/Ua3pCU8q1M3ZxYPXge/pD/XnCo76VemnD0WivwG+W8GsojL9jc+XzeINmkN mqag== 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:from:references:cc:to:subject:dkim-signature; bh=RgTZ0Y2VUw+Z4N1mKD1L2XaEnRTLuyDRai6jz97PnGk=; b=mjBjxyqqGKOJcG/JH7/l0bMVCZ3Hb95lt7t0QHUDAaIvlDRkibUhOISbi6qu5cFAXR 3lhmUdFr+BFlbzaLmQ8Th9YaQedaNqKZaR0itChsSPRg2zAme/G4Bd3ep2WtcXAxQNb0 XLGGF4HiV6iMaHl6/z/NXAQaQwO0U3bWtlrazsmaWqkOMuoI4OxStyyihG1yGzmUMh9t ur7UGQFW5eWj3L8XdFOOTaln1nCrLpA0MIhaFKHsN4RnWiBHyYqpdnkYmv0pFdxHCEcx hX//yV9kX2yjLmG6z15YjbgiRC220ub6hTZ9Bw/6SFCmucpWb64vaQLMdq4T3PzvvaFr HGpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dDwKcV9Z; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 100si5172044otn.128.2019.12.05.01.38.05; Thu, 05 Dec 2019 01:38:17 -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=@redhat.com header.s=mimecast20190719 header.b=dDwKcV9Z; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729099AbfLEJhg (ORCPT + 99 others); Thu, 5 Dec 2019 04:37:36 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:60064 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726096AbfLEJhg (ORCPT ); Thu, 5 Dec 2019 04:37:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575538654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RgTZ0Y2VUw+Z4N1mKD1L2XaEnRTLuyDRai6jz97PnGk=; b=dDwKcV9Zx3Q5mEMc/LDYJ7bNkNwSmR52byGkqbjaxpmOoRBHuFrQL8Rn2ioJfo1pmPoSnh hJvyAOtkuJX/dUpnggM9AqOt8ti4+BhOQPJ4Q46/SLCKL7Ry8MTG1Coo8/BU+A6S1tocQv +mNQtbJJk/j5vpiaoo1fQG8sZgdibmA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-79-4ieccuSzO8GpALfjAN5pKg-1; Thu, 05 Dec 2019 04:37:29 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 571BF800D5A; Thu, 5 Dec 2019 09:37:28 +0000 (UTC) Received: from [10.36.116.117] (ovpn-116-117.ams2.redhat.com [10.36.116.117]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D78A76E702; Thu, 5 Dec 2019 09:37:25 +0000 (UTC) Subject: Re: [RFC 3/3] KVM: arm64: pmu: Enforce PMEVTYPER evtCount size To: Will Deacon 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 References: <20191204204426.9628-1-eric.auger@redhat.com> <20191204204426.9628-4-eric.auger@redhat.com> <20191205090232.GC8606@willie-the-truck> From: Auger Eric Message-ID: Date: Thu, 5 Dec 2019 10:37:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20191205090232.GC8606@willie-the-truck> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: 4ieccuSzO8GpALfjAN5pKg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Will, On 12/5/19 10:02 AM, Will Deacon wrote: > 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)? You're right. It is RES0 and not RAZ. My mistake. Please ignore this patch. Thank you for the feedback. Eric > > Will >