From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPX7j-0006uP-EF for qemu-devel@nongnu.org; Mon, 17 Mar 2014 08:58:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPX7d-0000OA-2u for qemu-devel@nongnu.org; Mon, 17 Mar 2014 08:58:35 -0400 Received: from mail-lb0-f169.google.com ([209.85.217.169]:55155) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPX7c-0000Nv-Rc for qemu-devel@nongnu.org; Mon, 17 Mar 2014 08:58:28 -0400 Received: by mail-lb0-f169.google.com with SMTP id q8so3716414lbi.28 for ; Mon, 17 Mar 2014 05:58:27 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1394134385-1727-1-git-send-email-peter.maydell@linaro.org> <1394134385-1727-12-git-send-email-peter.maydell@linaro.org> From: Peter Maydell Date: Mon, 17 Mar 2014 12:58:07 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH v4 11/21] target-arm: Don't mention PMU in debug feature register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Rob Herring , Patch Tracking , Michael Matz , Claudio Fontana , Alexander Graf , "qemu-devel@nongnu.org Developers" , Laurent Desnogues , Dirk Mueller , Will Newton , =?UTF-8?B?QWxleCBCZW5uw6ll?= , "kvmarm@lists.cs.columbia.edu" , Christoffer Dall , Richard Henderson On 17 March 2014 05:13, Peter Crosthwaite wrote: > On Fri, Mar 7, 2014 at 5:32 AM, Peter Maydell wrote: >> Suppress the ID_AA64DFR0_EL1 PMUVer field, even if the CPU specific >> value claims that it exists. QEMU doesn't currently implement it, >> and not advertising it prevents the guest from trying to use it >> and getting UNDEFs on unimplemented registers. >> >> Signed-off-by: Peter Maydell > > Reviewed-by: Peter Crosthwaite > >> --- >> This is arguably a hack, but otherwise Linux tries to prod >> half a dozen PMU sysregs. > > Not really. I think sane self-identification trumps dummy feature > advertising. Although there is a consistency argument to be made, as > to whether you should also wipe-out any other features advertised by > this register and friends (e.g. should TraceVer be set?). The lack of consistency is what makes it a hack :-) Generally QEMU takes the approach of "report what the h/w reports even if we don't implement it all"; "report what we provide even if that's not the same values as h/w" would be a different approach, but if we wanted that we'd need to do it consistently. Still I think pragmatism wins out here. thanks -- PMM