Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-06-15 Thread Peter Maydell
On 16 May 2011 18:51, Peter Maydell wrote: > On 16 May 2011 18:29, Aurelien Jarno wrote: >> That said given this patch is more or less an extension of an existing >> code, we may want to apply it anyway. > > That is the conclusion I'm hoping to persuade you to, yes :-) This patch seems to have g

Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-05-16 Thread Aurelien Jarno
On Mon, May 16, 2011 at 06:47:42PM +0100, Peter Maydell wrote: > On 16 May 2011 18:29, Aurelien Jarno wrote: > > On Mon, May 16, 2011 at 05:37:03PM +0100, Peter Maydell wrote: > >> You can do this by calling GETPC() from the top level helper function > >> though, right? [OK, we'd need to move the

Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-05-16 Thread Peter Maydell
On 16 May 2011 18:29, Aurelien Jarno wrote: > That said given this patch is more or less an extension of an existing > code, we may want to apply it anyway. That is the conclusion I'm hoping to persuade you to, yes :-) -- PMM

Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-05-16 Thread Peter Maydell
On 16 May 2011 18:29, Aurelien Jarno wrote: > On Mon, May 16, 2011 at 05:37:03PM +0100, Peter Maydell wrote: >> You can do this by calling GETPC() from the top level helper function >> though, right? [OK, we'd need to move the definition out of dyngen-exec.h.] > > No we don't need to move it out o

Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-05-16 Thread Aurelien Jarno
On Mon, May 16, 2011 at 10:59:47AM +0100, Peter Maydell wrote: > On 14 May 2011 22:32, Aurelien Jarno wrote: > > On Fri, May 06, 2011 at 03:32:27PM +0100, Peter Maydell wrote: > >> I just spoke with Paul on IRC about this. In summary: > >>  * for a helper to cause an exception then it has (a) to m

Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-05-16 Thread Aurelien Jarno
On Mon, May 16, 2011 at 05:37:03PM +0100, Peter Maydell wrote: > On 16 May 2011 17:10, Paul Brook wrote: > >> > I just spoke with Paul on IRC about this. In summary: > >> >  * for a helper to cause an exception then it has (a) to make sure CPU > >> > > >> > state (pc, condflags) is sync'd before t

Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-05-16 Thread Peter Maydell
On 16 May 2011 17:10, Paul Brook wrote: >> > I just spoke with Paul on IRC about this. In summary: >> >  * for a helper to cause an exception then it has (a) to make sure CPU >> > >> > state (pc, condflags) is sync'd before the call to the helper and (b) >> > the helper has to be in a file with ac

Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-05-16 Thread Paul Brook
> > I just spoke with Paul on IRC about this. In summary: > > * for a helper to cause an exception then it has (a) to make sure CPU > > > > state (pc, condflags) is sync'd before the call to the helper and (b) > > the helper has to be in a file with access to global env, because it > > needs to ca

Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-05-16 Thread Peter Maydell
On 14 May 2011 22:32, Aurelien Jarno wrote: > On Fri, May 06, 2011 at 03:32:27PM +0100, Peter Maydell wrote: >> I just spoke with Paul on IRC about this. In summary: >>  * for a helper to cause an exception then it has (a) to make sure CPU >> state (pc, condflags) is sync'd before the call to the

Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-05-14 Thread Aurelien Jarno
On Sun, May 15, 2011 at 01:01:40AM +0300, Blue Swirl wrote: > On Sun, May 15, 2011 at 12:32 AM, Aurelien Jarno wrote: > > On Fri, May 06, 2011 at 03:32:27PM +0100, Peter Maydell wrote: > >> On 26 April 2011 11:23, Aurelien Jarno wrote: > >> > On Mon, Apr 25, 2011 at 11:35:54PM +0100, Peter Maydel

Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-05-14 Thread Blue Swirl
On Sun, May 15, 2011 at 12:32 AM, Aurelien Jarno wrote: > On Fri, May 06, 2011 at 03:32:27PM +0100, Peter Maydell wrote: >> On 26 April 2011 11:23, Aurelien Jarno wrote: >> > On Mon, Apr 25, 2011 at 11:35:54PM +0100, Peter Maydell wrote: >> >> On 25 April 2011 23:31, Aurelien Jarno wrote: >> >>

Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-05-14 Thread Aurelien Jarno
On Fri, May 06, 2011 at 03:32:27PM +0100, Peter Maydell wrote: > On 26 April 2011 11:23, Aurelien Jarno wrote: > > On Mon, Apr 25, 2011 at 11:35:54PM +0100, Peter Maydell wrote: > >> On 25 April 2011 23:31, Aurelien Jarno wrote: > >> > On Mon, Apr 25, 2011 at 10:59:52PM +0100, Peter Maydell wrote

Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-05-06 Thread Peter Maydell
On 26 April 2011 11:23, Aurelien Jarno wrote: > On Mon, Apr 25, 2011 at 11:35:54PM +0100, Peter Maydell wrote: >> On 25 April 2011 23:31, Aurelien Jarno wrote: >> > On Mon, Apr 25, 2011 at 10:59:52PM +0100, Peter Maydell wrote: >> >> On 25 April 2011 22:09, Aurelien Jarno wrote: >> >> > Instead

Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-04-26 Thread Aurelien Jarno
On Mon, Apr 25, 2011 at 11:35:54PM +0100, Peter Maydell wrote: > On 25 April 2011 23:31, Aurelien Jarno wrote: > > On Mon, Apr 25, 2011 at 10:59:52PM +0100, Peter Maydell wrote: > >> On 25 April 2011 22:09, Aurelien Jarno wrote: > >> > Instead of having this complex test for all cp15 access, but

Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-04-25 Thread Peter Maydell
On 25 April 2011 23:31, Aurelien Jarno wrote: > On Mon, Apr 25, 2011 at 10:59:52PM +0100, Peter Maydell wrote: >> On 25 April 2011 22:09, Aurelien Jarno wrote: >> > Instead of having this complex test for all cp15 access, but only for >> > catching a few access to performance registers, wouldn't

Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-04-25 Thread Aurelien Jarno
On Mon, Apr 25, 2011 at 10:59:52PM +0100, Peter Maydell wrote: > On 25 April 2011 22:09, Aurelien Jarno wrote: > > On Thu, Apr 21, 2011 at 05:01:48PM +0100, Peter Maydell wrote: > > >> +                tb_flush(env); > > > > If you flush all tbs, you also have to ensure that on the translate.c >

Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-04-25 Thread Peter Maydell
On 25 April 2011 22:09, Aurelien Jarno wrote: > On Thu, Apr 21, 2011 at 05:01:48PM +0100, Peter Maydell wrote: >> +                tb_flush(env); > > If you flush all tbs, you also have to ensure that on the translate.c > side, this is the last instruction of the tb. Otherwise, the rest of the >

Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-04-25 Thread Aurelien Jarno
On Thu, Apr 21, 2011 at 05:01:48PM +0100, Peter Maydell wrote: > Newer Linux kernels assume the existence of the performance counter > cp15 registers. Provide a minimal implementation of these registers. > We support no events. This should be compliant with the ARM ARM, > except that we don't imple

Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-04-22 Thread Brad Hards
On Friday 22 April 2011 19:48:09 Peter Maydell wrote: > Looking at your .rej file it seems to have lost the hardcoded tab > characters[*] that are in the patch; I suspect something in your mailer > is turning them back into spaces. Try downloading the patch from > patchwork instead. Yep, that worke

Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-04-22 Thread Peter Maydell
On 22 April 2011 08:23, Brad Hards wrote: > On Friday 22 April 2011 02:01:48 Peter Maydell wrote: >> Newer Linux kernels assume the existence of the performance counter >> cp15 registers. Provide a minimal implementation of these registers. >> We support no events. This should be compliant with th

Re: [Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-04-22 Thread Brad Hards
On Friday 22 April 2011 02:01:48 Peter Maydell wrote: > Newer Linux kernels assume the existence of the performance counter > cp15 registers. Provide a minimal implementation of these registers. > We support no events. This should be compliant with the ARM ARM, > except that we don't implement the

[Qemu-devel] [PATCH] target-arm: Minimal implementation of performance counters

2011-04-21 Thread Peter Maydell
Newer Linux kernels assume the existence of the performance counter cp15 registers. Provide a minimal implementation of these registers. We support no events. This should be compliant with the ARM ARM, except that we don't implement the cycle counter. Signed-off-by: Peter Maydell --- This is the