From: Jintack Lim <jintack@cs.columbia.edu>
To: pbonzini@redhat.com, rkrcmar@redhat.com,
christoffer.dall@linaro.org, marc.zyngier@arm.com,
linux@armlinux.org.uk, catalin.marinas@arm.com,
will.deacon@arm.com, andre.przywara@arm.com, kvm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org
Cc: jintack@cs.columbia.edu
Subject: [RFC v4 06/10] KVM: arm/arm64: Update the physical timer interrupt level
Date: Fri, 3 Feb 2017 10:20:04 -0500 [thread overview]
Message-ID: <1486135208-13415-7-git-send-email-jintack@cs.columbia.edu> (raw)
In-Reply-To: <1486135208-13415-1-git-send-email-jintack@cs.columbia.edu>
Now that we maintain the EL1 physical timer register states of VMs,
update the physical timer interrupt level along with the virtual one.
Signed-off-by: Jintack Lim <jintack@cs.columbia.edu>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
---
virt/kvm/arm/arch_timer.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/virt/kvm/arm/arch_timer.c b/virt/kvm/arm/arch_timer.c
index dbd0af1..7f9a664 100644
--- a/virt/kvm/arm/arch_timer.c
+++ b/virt/kvm/arm/arch_timer.c
@@ -186,6 +186,7 @@ static int kvm_timer_update_state(struct kvm_vcpu *vcpu)
{
struct arch_timer_cpu *timer = &vcpu->arch.timer_cpu;
struct arch_timer_context *vtimer = vcpu_vtimer(vcpu);
+ struct arch_timer_context *ptimer = vcpu_ptimer(vcpu);
/*
* If userspace modified the timer registers via SET_ONE_REG before
@@ -199,6 +200,9 @@ static int kvm_timer_update_state(struct kvm_vcpu *vcpu)
if (kvm_timer_should_fire(vtimer) != vtimer->irq.level)
kvm_timer_update_irq(vcpu, !vtimer->irq.level, vtimer);
+ if (kvm_timer_should_fire(ptimer) != ptimer->irq.level)
+ kvm_timer_update_irq(vcpu, !ptimer->irq.level, ptimer);
+
return 0;
}
--
1.9.1
next prev parent reply other threads:[~2017-02-03 15:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-03 15:19 [RFC v4 00/10] Provide the EL1 physical timer to the VM Jintack Lim
2017-02-03 15:19 ` [RFC v4 01/10] KVM: arm/arm64: Abstract virtual timer context into separate structure Jintack Lim
2017-02-03 15:20 ` [RFC v4 02/10] KVM: arm/arm64: Move cntvoff to each timer context Jintack Lim
2017-02-03 15:20 ` [RFC v4 03/10] KVM: arm/arm64: Decouple kvm timer functions from virtual timer Jintack Lim
2017-02-03 15:20 ` [RFC v4 04/10] KVM: arm/arm64: Add the EL1 physical timer context Jintack Lim
2017-02-03 15:20 ` [RFC v4 05/10] KVM: arm/arm64: Initialize the emulated EL1 physical timer Jintack Lim
2017-02-03 15:20 ` Jintack Lim [this message]
2017-02-03 15:20 ` [RFC v4 07/10] KVM: arm/arm64: Set a background timer to the earliest timer expiration Jintack Lim
2017-02-03 15:20 ` [RFC v4 08/10] KVM: arm/arm64: Set up a background timer for the physical timer emulation Jintack Lim
2017-02-03 15:20 ` [RFC v4 09/10] KVM: arm64: Add the EL1 physical timer access handler Jintack Lim
2017-02-03 15:20 ` [RFC v4 10/10] KVM: arm/arm64: Emulate the EL1 phys timer registers Jintack Lim
2017-02-03 16:14 ` [RFC v4 00/10] Provide the EL1 physical timer to the VM Marc Zyngier
2017-02-03 16:51 ` Jintack Lim
2017-02-03 16:54 ` Marc Zyngier
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=1486135208-13415-7-git-send-email-jintack@cs.columbia.edu \
--to=jintack@cs.columbia.edu \
--cc=andre.przywara@arm.com \
--cc=catalin.marinas@arm.com \
--cc=christoffer.dall@linaro.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=marc.zyngier@arm.com \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=will.deacon@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
all inboxes | Powered by JetHome®