[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu-devel] [PATCH v6 04/14] target/arm: Swap PMU values
From: |
Aaron Lindsay |
Subject: |
Re: [Qemu-arm] [Qemu-devel] [PATCH v6 04/14] target/arm: Swap PMU values before/after migrations |
Date: |
Mon, 15 Oct 2018 16:44:24 -0400 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Oct 15 12:45, Richard Henderson wrote:
> On 10/10/18 1:37 PM, Aaron Lindsay wrote:
> > +static void cpu_post_save(void *opaque)
> > +{
> > + ARMCPU *cpu = opaque;
> > + pmccntr_sync(&cpu->env);
> > +}
>
> I'm confused about the need for this.
> Can you explain the sequence of events that requires it?
It sounds like you're more okay with this now based on your comments on
my later patch, but for others...
The PMU implementation is event-driven - the counters and other
associated PMU/sysreg state are only updated when needed to ensure the
architectural state observed by the system is correct (i.e. on system
register reads). Otherwise, the counters are stored as differences from
the underlying counts rather than the raw counter values themselves.
Upon migration, we want to convert the counters and other state to their
architectural versions, but then want to swap it all back to the
differential versions again when we're done saving/loading.
-Aaron
- [Qemu-arm] [PATCH v6 00/14] More fully implement ARM PMUv3, Aaron Lindsay, 2018/10/10
- [Qemu-arm] [PATCH v6 07/14] target/arm: Allow AArch32 access for PMCCFILTR, Aaron Lindsay, 2018/10/10
- [Qemu-arm] [PATCH v6 01/14] target/arm: Mark PMINTENCLR and PMINTENCLR_EL1 accesses as possibly doing IO, Aaron Lindsay, 2018/10/10
- [Qemu-arm] [PATCH v6 02/14] target/arm: Mask PMOVSR writes based on supported counters, Aaron Lindsay, 2018/10/10
- [Qemu-arm] [PATCH v6 04/14] target/arm: Swap PMU values before/after migrations, Aaron Lindsay, 2018/10/10
- [Qemu-arm] [PATCH v6 08/14] target/arm: Implement PMOVSSET, Aaron Lindsay, 2018/10/10
- [Qemu-arm] [PATCH v6 03/14] migration: Add post_save function to VMStateDescription, Aaron Lindsay, 2018/10/10
- Re: [Qemu-arm] [Qemu-devel] [PATCH v6 03/14] migration: Add post_save function to VMStateDescription, Richard Henderson, 2018/10/15
- Re: [Qemu-arm] [Qemu-devel] [PATCH v6 03/14] migration: Add post_save function to VMStateDescription, Dr. David Alan Gilbert, 2018/10/16
- Re: [Qemu-arm] [Qemu-devel] [PATCH v6 03/14] migration: Add post_save function to VMStateDescription, Aaron Lindsay, 2018/10/16
- Re: [Qemu-arm] [Qemu-devel] [PATCH v6 03/14] migration: Add post_save function to VMStateDescription, Dr. David Alan Gilbert, 2018/10/16
- Re: [Qemu-arm] [Qemu-devel] [PATCH v6 03/14] migration: Add post_save function to VMStateDescription, Aaron Lindsay, 2018/10/16
- Re: [Qemu-arm] [Qemu-devel] [PATCH v6 03/14] migration: Add post_save function to VMStateDescription, Dr. David Alan Gilbert, 2018/10/16
- Re: [Qemu-arm] [PATCH v6 03/14] migration: Add post_save function to VMStateDescription, Juan Quintela, 2018/10/17