qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [PATCH v9 14/14] target/arm: Send interrupts on PMU count


From: Aaron Lindsay
Subject: Re: [Qemu-arm] [PATCH v9 14/14] target/arm: Send interrupts on PMU counter overflow
Date: Tue, 11 Dec 2018 14:46:55 +0000

On Dec 06 16:03, Peter Maydell wrote:
> On Wed, 5 Dec 2018 at 13:44, Aaron Lindsay <address@hidden> wrote:
> >
> > Setup a QEMUTimer to get a callback when we expect counters to next
> > overflow and trigger an interrupt at that time.
> >
> > Signed-off-by: Aaron Lindsay <address@hidden>
> > Signed-off-by: Aaron Lindsay <address@hidden>
> > ---
> >  target/arm/cpu.c    |  12 +++++
> >  target/arm/cpu.h    |   7 +++
> >  target/arm/helper.c | 126 +++++++++++++++++++++++++++++++++++++++++---
> >  3 files changed, 139 insertions(+), 6 deletions(-)
> >
> > --- a/target/arm/cpu.h
> > +++ b/target/arm/cpu.h
> > @@ -733,6 +733,8 @@ struct ARMCPU {
> >
> >      /* Timers used by the generic (architected) timer */
> >      QEMUTimer *gt_timer[NUM_GTIMERS];
> > +    /* Timer used by the PMU */
> > +    QEMUTimer *pmu_timer;
> 
> We don't seem to migrate this timer state. Is that OK? If so,
> a brief comment somewhere with the rationale would be helpful.

cpu_post_load() calls pmccntr_op_finish() and pmevcntr_op_finish() for
each counter via pmu_op_finish(). They handle setting the timer
according to the restored counters' state. I'll add a comment here at
the definition unless you prefer somewhere else.

-Aaron



reply via email to

[Prev in Thread] Current Thread [Next in Thread]