Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946121AbbEOQSS (ORCPT ); Fri, 15 May 2015 12:18:18 -0400 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:36610 "EHLO socrates.bennee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964787AbbEOQSR (ORCPT ); Fri, 15 May 2015 12:18:17 -0400 References: <1431700035-23479-1-git-send-email-alex.bennee@linaro.org> <1431700035-23479-4-git-send-email-alex.bennee@linaro.org> <20150515144423.GA23652@leverpostej> <874mndlvny.fsf@linaro.org> <20150515154324.GC23652@leverpostej> From: Alex =?utf-8?Q?Benn=C3=A9e?= To: Mark Rutland Cc: Peter Maydell , "kvm\@vger.kernel.org" , "linux-arm-kernel\@lists.infradead.org" , "kvmarm\@lists.cs.columbia.edu" , "christoffer.dall\@linaro.org" , Marc Zyngier , "agraf\@suse.de" , "drjones\@redhat.com" , "pbonzini\@redhat.com" , "zhichao.huang\@linaro.org" , Catalin Marinas , "jan.kiszka\@siemens.com" , Will Deacon , open list , "dahi\@linux.vnet.ibm.com" , "r65777\@freescale.com" , "bp\@suse.de" Subject: Re: [PATCH v4 03/12] KVM: arm64: guest debug, define API headers In-reply-to: <20150515154324.GC23652@leverpostej> Date: Fri, 15 May 2015 17:19:03 +0100 Message-ID: <87wq09ke4o.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: alex.bennee@linaro.org X-SA-Exim-Scanned: No (on socrates.bennee.com); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1782 Lines: 51 Mark Rutland writes: > On Fri, May 15, 2015 at 04:17:46PM +0100, Peter Maydell wrote: >> On 15 May 2015 at 16:14, Alex Bennée wrote: >> > >> > Mark Rutland writes: >> > >> >> On Fri, May 15, 2015 at 03:27:06PM +0100, Alex Bennée wrote: >> >>> +/* >> >>> + * See v8 ARM ARM D7.3: Debug Registers >> >>> + * >> >>> + * The control registers are architecturally defined as 32 bits but are >> >>> + * stored as 64 bit values alongside the value registers. This is done >> >> >> >> Stale comment? They're stored as __u32 below. >> > >> > Gah yes it is. >> > >> >> It's possible that the registers could grow in future as happened in the >> >> case of CLIDR_EL1, so it might be worth treating system registers >> >> generally as u64 values. >> > >> > Really? I mean the existing debug *control* registers have reserved bits >> > 24-31 so there is space for expansion. >> >> Other places in the userspace ABI which deal with sysregs (notably >> ONE_REG) consistently define them all as 64-bit > > Also for pt_regs.pstate. > > I just spotted that in user_hwdebug_state in ptrace.h we seem to expose > the debug control regsiters as __u32 already, aalong with some other > registers. I thought those where ptrace specific fields which then get munged into the final values inside the kernel? > > So we're already inconsistent w.r.t. how we expose those registers, and > I'm not sure what we'd do elsewhere if any registers got expanded. :/ > > Mark. -- Alex Bennée -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/