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 peter.mayd...@linaro.org wrote: On 16 May 2011 18:29, Aurelien Jarno aurel...@aurel32.net 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

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 aurel...@aurel32.net 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

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 call

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 p...@codesourcery.com 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

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 p...@codesourcery.com 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

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 aurel...@aurel32.net 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

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 aurel...@aurel32.net 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

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 aurel...@aurel32.net 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 Aurelien Jarno
On Mon, May 16, 2011 at 06:47:42PM +0100, Peter Maydell wrote: On 16 May 2011 18:29, Aurelien Jarno aurel...@aurel32.net 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

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 aurel...@aurel32.net wrote: On Mon, Apr 25, 2011 at 11:35:54PM +0100, Peter Maydell wrote: On 25 April 2011 23:31, Aurelien Jarno aurel...@aurel32.net wrote: On Mon, Apr 25, 2011 at

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 aurel...@aurel32.net wrote: On Fri, May 06, 2011 at 03:32:27PM +0100, Peter Maydell wrote: On 26 April 2011 11:23, Aurelien Jarno aurel...@aurel32.net wrote: On Mon, Apr 25, 2011 at 11:35:54PM +0100, Peter Maydell wrote: On 25 April 2011

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 aurel...@aurel32.net wrote: On Fri, May 06, 2011 at 03:32:27PM +0100, Peter Maydell wrote: On 26 April 2011 11:23, Aurelien Jarno aurel...@aurel32.net wrote: On Mon, Apr 25, 2011 at

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 aurel...@aurel32.net wrote: On Mon, Apr 25, 2011 at 11:35:54PM +0100, Peter Maydell wrote: On 25 April 2011 23:31, Aurelien Jarno aurel...@aurel32.net wrote: On Mon, Apr 25, 2011 at 10:59:52PM +0100, Peter Maydell wrote: On 25 April 2011 22:09, Aurelien

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 aurel...@aurel32.net wrote: On Mon, Apr 25, 2011 at 10:59:52PM +0100, Peter Maydell wrote: On 25 April 2011 22:09, Aurelien Jarno aurel...@aurel32.net wrote: Instead of having this complex

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

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 aurel...@aurel32.net 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

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 aurel...@aurel32.net 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

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 aurel...@aurel32.net wrote: On Mon, Apr 25, 2011 at 10:59:52PM +0100, Peter Maydell wrote: On 25 April 2011 22:09, Aurelien Jarno aurel...@aurel32.net wrote: Instead of having this complex test for all cp15 access, but only for catching a few access to

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

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 br...@frogmouth.net 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

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 worked.

[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