From: Christoffer Dall <christoffer.dall@arm.com>
To: "André Przywara" <andre.przywara@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>,
kvmarm@lists.cs.columbia.edu,
linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org
Subject: Re: [PATCH 11/14] KVM: arm/arm64: timer: Rework data structures for multiple timers
Date: Tue, 19 Feb 2019 13:27:44 +0100 [thread overview]
Message-ID: <20190219122744.GC28113@e113682-lin.lund.arm.com> (raw)
In-Reply-To: <d44bd102-5ad6-6e08-5e47-8a8386a139c6@arm.com>
On Mon, Feb 18, 2019 at 03:10:16PM +0000, André Przywara wrote:
> On Thu, 24 Jan 2019 15:00:29 +0100
> Christoffer Dall <christoffer.dall@arm.com> wrote:
>
> Hi,
>
> I already looked at most of these patches earlier, without finding
> serious issues, but figured I would give those without any Reviewed-by:
> or Acked-by: tags a closer look.
> (This patch just carries a S-o-b: tag from Marc in the kvm-arm git repo.)
>
> > Prepare for having 4 timer data structures (2 for now).
> >
> > Change loaded to an enum so that we know not just whether *some* state
> > is loaded on the CPU, but also *which* state is loaded.
> >
> > Move loaded to the cpu data structure and not the individual timer
> > structure, in preparation for assigning the EL1 phys timer as well.
> >
> > Signed-off-by: Christoffer Dall <christoffer.dall@arm.com>
> > Acked-by: Marc Zyngier <marc.zyngier@arm.com>
> > ---
> > include/kvm/arm_arch_timer.h | 44 ++++++++++++++-------------
> > virt/kvm/arm/arch_timer.c | 58 +++++++++++++++++++-----------------
> > 2 files changed, 54 insertions(+), 48 deletions(-)
> >
> > diff --git a/include/kvm/arm_arch_timer.h b/include/kvm/arm_arch_timer.h
> > index d26b7fde9935..d40fe57a2d0d 100644
> > --- a/include/kvm/arm_arch_timer.h
> > +++ b/include/kvm/arm_arch_timer.h
> > @@ -36,6 +36,8 @@ enum kvm_arch_timer_regs {
> > };
> >
> > struct arch_timer_context {
> > + struct kvm_vcpu *vcpu;
> > +
> > /* Registers: control register, timer value */
> > u32 cnt_ctl;
> > u64 cnt_cval;
> > @@ -43,32 +45,34 @@ struct arch_timer_context {
> > /* Timer IRQ */
> > struct kvm_irq_level irq;
> >
> > - /*
> > - * We have multiple paths which can save/restore the timer state
> > - * onto the hardware, so we need some way of keeping track of
> > - * where the latest state is.
> > - *
> > - * loaded == true: State is loaded on the hardware registers.
> > - * loaded == false: State is stored in memory.
> > - */
> > - bool loaded;
> > -
> > /* Virtual offset */
> > - u64 cntvoff;
> > + u64 cntvoff;
> > +
> > + /* Emulated Timer (may be unused) */
> > + struct hrtimer hrtimer;
> > +};
> > +
> > +enum loaded_timer_state {
> > + TIMER_NOT_LOADED,
> > + TIMER_EL1_LOADED,
>
> So this gets reverted in PATCH 13/14, and I don't see it reappearing in
> the nv series later on.
> Is that just needed for assigning the phys timer in the next patch, and
> gets obsolete with the timer_map?
> Or is this a rebase artefact and we don't actually need this?
I think this is a rebase problem and we could have optimized this out to
reduce the patch diff. The end result is the same though.
>
> The rest of the patch looks like valid transformations to me.
>
Thanks for having a look.
Christoffer
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-02-19 12:28 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-24 14:00 [PATCH 00/14] KVM: arm/arm64: Various rework in preparation of nested virt support Christoffer Dall
2019-01-24 14:00 ` [PATCH 01/14] arm/arm64: KVM: Introduce kvm_call_hyp_ret() Christoffer Dall
2019-01-24 14:00 ` [PATCH 02/14] arm64: KVM: Allow for direct call of HYP functions when using VHE Christoffer Dall
2019-01-24 14:00 ` [PATCH 03/14] arm64: KVM: Drop VHE-specific HYP call stub Christoffer Dall
2019-01-24 14:00 ` [PATCH 04/14] ARM: KVM: Teach some form of type-safety to kvm_call_hyp Christoffer Dall
2019-01-24 14:00 ` [PATCH 05/14] arm/arm64: KVM: Statically configure the host's view of MPIDR Christoffer Dall
2019-01-24 14:00 ` [PATCH 06/14] KVM: arm/arm64: Factor out VMID into struct kvm_vmid Christoffer Dall
2019-01-24 19:01 ` James Morse
2019-01-25 10:09 ` Marc Zyngier
2019-01-25 11:05 ` Julien Thierry
2019-01-31 13:01 ` Marc Zyngier
2019-02-21 11:02 ` Julien Grall
2019-02-22 9:18 ` Marc Zyngier
2019-02-22 11:42 ` Julien Grall
2019-02-22 12:14 ` Marc Zyngier
2019-01-24 14:00 ` [PATCH 07/14] KVM: arm/arm64: Simplify bg_timer programming Christoffer Dall
2019-01-24 14:00 ` [PATCH 08/14] KVM: arm64: Fix ICH_ELRSR_EL2 sysreg naming Christoffer Dall
2019-01-24 14:00 ` [PATCH 09/14] KVM: arm64: Reuse sys_reg() macro when searching the trap table Christoffer Dall
2019-01-30 8:57 ` André Przywara
2019-01-24 14:00 ` [PATCH 10/14] KVM: arm/arm64: consolidate arch timer trap handlers Christoffer Dall
2019-01-25 12:33 ` Julien Thierry
2019-01-30 17:38 ` Marc Zyngier
2019-01-24 14:00 ` [PATCH 11/14] KVM: arm/arm64: timer: Rework data structures for multiple timers Christoffer Dall
2019-02-18 15:10 ` André Przywara
2019-02-19 12:27 ` Christoffer Dall [this message]
2019-01-24 14:00 ` [PATCH 12/14] KVM: arm/arm64: arch_timer: Assign the phys timer on VHE systems Christoffer Dall
2019-02-18 15:10 ` André Przywara
2019-02-19 12:43 ` Christoffer Dall
2019-02-20 17:58 ` Andre Przywara
2019-02-19 11:39 ` Alexandru Elisei
2019-02-19 13:03 ` Christoffer Dall
2019-01-24 14:00 ` [PATCH 13/14] KVM: arm/arm64: Rework the timer code to use a timer_map Christoffer Dall
2019-01-24 14:00 ` [PATCH 14/14] KVM: arm/arm64: Move kvm_is_write_fault to header file Christoffer Dall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190219122744.GC28113@e113682-lin.lund.arm.com \
--to=christoffer.dall@arm.com \
--cc=andre.przywara@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=marc.zyngier@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).