Re: [Qemu-devel] implementing architectural timers using QEMU timers

2017-01-17 Thread Max Filippov
On Mon, Jan 16, 2017 at 9:19 AM, Paolo Bonzini wrote: > On 12/01/2017 13:19, Pavel Dovgalyuk wrote: >>> From: Peter Maydell [mailto:peter.mayd...@linaro.org] >>> On 12 January 2017 at 11:28, Pavel Dovgalyuk wrote: > From: Max Filippov [mailto:jcmvb...@gmail.com] > Ok, looks like what happ

Re: [Qemu-devel] implementing architectural timers using QEMU timers

2017-01-16 Thread Pavel Dovgalyuk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 12/01/2017 13:19, Pavel Dovgalyuk wrote: > >> From: Peter Maydell [mailto:peter.mayd...@linaro.org] > >> On 12 January 2017 at 11:28, Pavel Dovgalyuk wrote: > From: Max Filippov [mailto:jcmvb...@gmail.co

Re: [Qemu-devel] implementing architectural timers using QEMU timers

2017-01-16 Thread Paolo Bonzini
On 12/01/2017 13:19, Pavel Dovgalyuk wrote: >> From: Peter Maydell [mailto:peter.mayd...@linaro.org] >> On 12 January 2017 at 11:28, Pavel Dovgalyuk wrote: From: Max Filippov [mailto:jcmvb...@gmail.com] Ok, looks like what happens in my case is that instruction that sets CCOMPARE

Re: [Qemu-devel] implementing architectural timers using QEMU timers

2017-01-15 Thread Max Filippov
On Thu, Jan 12, 2017 at 3:28 AM, Pavel Dovgalyuk wrote: >> From: Max Filippov [mailto:jcmvb...@gmail.com] >> On Tue, Jan 10, 2017 at 12:31 AM, Pavel Dovgalyuk wrote: >> >> From: Max Filippov [mailto:jcmvb...@gmail.com] >> > >> >> I'm trying to reimplement xtensa CCOUNT (cycle counter) and >> >> C

Re: [Qemu-devel] implementing architectural timers using QEMU timers

2017-01-12 Thread Pavel Dovgalyuk
> From: Peter Maydell [mailto:peter.mayd...@linaro.org] > On 12 January 2017 at 11:28, Pavel Dovgalyuk wrote: > >> From: Max Filippov [mailto:jcmvb...@gmail.com] > >> Ok, looks like what happens in my case is that instruction that > >> sets CCOMPARE and thus changes remaining icount does not > >>

Re: [Qemu-devel] implementing architectural timers using QEMU timers

2017-01-12 Thread Peter Maydell
On 12 January 2017 at 11:28, Pavel Dovgalyuk wrote: >> From: Max Filippov [mailto:jcmvb...@gmail.com] >> Ok, looks like what happens in my case is that instruction that >> sets CCOMPARE and thus changes remaining icount does not >> cause exit from the cpu_exec. So merely ending TB on >> QEMU_CLOCK

Re: [Qemu-devel] implementing architectural timers using QEMU timers

2017-01-12 Thread Pavel Dovgalyuk
> From: Max Filippov [mailto:jcmvb...@gmail.com] > On Tue, Jan 10, 2017 at 12:31 AM, Pavel Dovgalyuk wrote: > >> From: Max Filippov [mailto:jcmvb...@gmail.com] > > > >> I'm trying to reimplement xtensa CCOUNT (cycle counter) and > >> CCOMPARE (CCOUNT-based timer interrupts) using QEMU > >> timers.

Re: [Qemu-devel] implementing architectural timers using QEMU timers

2017-01-10 Thread Max Filippov
On Tue, Jan 10, 2017 at 10:47 AM, Peter Maydell wrote: > On 10 January 2017 at 18:39, Max Filippov wrote: >> Ok, looks like what happens in my case is that instruction that >> sets CCOMPARE and thus changes remaining icount does not >> cause exit from the cpu_exec. So merely ending TB on >> QEMU_

Re: [Qemu-devel] implementing architectural timers using QEMU timers

2017-01-10 Thread Peter Maydell
On 10 January 2017 at 18:39, Max Filippov wrote: > Ok, looks like what happens in my case is that instruction that > sets CCOMPARE and thus changes remaining icount does not > cause exit from the cpu_exec. So merely ending TB on > QEMU_CLOCK_VIRTUAL timer update is not enough, I need to > throw an

Re: [Qemu-devel] implementing architectural timers using QEMU timers

2017-01-10 Thread Max Filippov
On Tue, Jan 10, 2017 at 1:10 AM, Frederic Konrad wrote: > On 01/09/2017 04:18 PM, Max Filippov wrote: >> I'm trying to reimplement xtensa CCOUNT (cycle counter) and >> CCOMPARE (CCOUNT-based timer interrupts) using QEMU >> timers. That is CCOUNT value is derived from the >> QEMU_CLOCK_VIRTUAL cloc

Re: [Qemu-devel] implementing architectural timers using QEMU timers

2017-01-10 Thread Max Filippov
On Tue, Jan 10, 2017 at 12:31 AM, Pavel Dovgalyuk wrote: >> From: Max Filippov [mailto:jcmvb...@gmail.com] > >> I'm trying to reimplement xtensa CCOUNT (cycle counter) and >> CCOMPARE (CCOUNT-based timer interrupts) using QEMU >> timers. That is CCOUNT value is derived from the >> QEMU_CLOCK_VIRTU

Re: [Qemu-devel] implementing architectural timers using QEMU timers

2017-01-10 Thread Max Filippov
On Mon, Jan 9, 2017 at 7:41 AM, Alex Bligh wrote: >> On 9 Jan 2017, at 15:18, Max Filippov wrote: >> I'm trying to reimplement xtensa CCOUNT (cycle counter) and >> CCOMPARE (CCOUNT-based timer interrupts) using QEMU >> timers. That is CCOUNT value is derived from the >> QEMU_CLOCK_VIRTUAL clock a

Re: [Qemu-devel] implementing architectural timers using QEMU timers

2017-01-10 Thread Frederic Konrad
On 01/09/2017 04:18 PM, Max Filippov wrote: > Hello, > > I'm trying to reimplement xtensa CCOUNT (cycle counter) and > CCOMPARE (CCOUNT-based timer interrupts) using QEMU > timers. That is CCOUNT value is derived from the > QEMU_CLOCK_VIRTUAL clock and CCOMPARE interrupts are > generated from the

Re: [Qemu-devel] implementing architectural timers using QEMU timers

2017-01-10 Thread Pavel Dovgalyuk
> From: Max Filippov [mailto:jcmvb...@gmail.com] > I'm trying to reimplement xtensa CCOUNT (cycle counter) and > CCOMPARE (CCOUNT-based timer interrupts) using QEMU > timers. That is CCOUNT value is derived from the > QEMU_CLOCK_VIRTUAL clock and CCOMPARE interrupts are > generated from the QEMU_C

Re: [Qemu-devel] implementing architectural timers using QEMU timers

2017-01-09 Thread Alex Bligh
> On 9 Jan 2017, at 15:18, Max Filippov wrote: > > Hello, > > I'm trying to reimplement xtensa CCOUNT (cycle counter) and > CCOMPARE (CCOUNT-based timer interrupts) using QEMU > timers. That is CCOUNT value is derived from the > QEMU_CLOCK_VIRTUAL clock and CCOMPARE interrupts are > generated f

[Qemu-devel] implementing architectural timers using QEMU timers

2017-01-09 Thread Max Filippov
Hello, I'm trying to reimplement xtensa CCOUNT (cycle counter) and CCOMPARE (CCOUNT-based timer interrupts) using QEMU timers. That is CCOUNT value is derived from the QEMU_CLOCK_VIRTUAL clock and CCOMPARE interrupts are generated from the QEMU_CLOCK_VIRTUAL timer callbacks. The code is here: ht