Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1571851

[RFC v3 06/10] KVM: arm/arm64: Update the physical timer interrupt level

From Jintack Lim <jintack@cs.columbia.edu>
Newsgroups linux.kernel
Subject [RFC v3 06/10] KVM: arm/arm64: Update the physical timer interrupt level
Date 2017-02-01 18:50 +0100
Message-ID <t67cD-tm-43@gated-at.bofh.it> (permalink)
References <t67cB-tm-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 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 ae38703..1b086fd6 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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC v3 00/10] Provide the EL1 physical timer to the VM Jintack Lim <jintack@cs.columbia.edu> - 2017-02-01 18:50 +0100
  [RFC v3 04/10] KVM: arm/arm64: Add the EL1 physical timer context Jintack Lim <jintack@cs.columbia.edu> - 2017-02-01 18:50 +0100
    Re: [RFC v3 04/10] KVM: arm/arm64: Add the EL1 physical timer context Christoffer Dall <cdall@linaro.org> - 2017-02-02 11:20 +0100
  [RFC v3 08/10] KVM: arm/arm64: Set up a background timer for the physical timer emulation Jintack Lim <jintack@cs.columbia.edu> - 2017-02-01 18:50 +0100
    Re: [RFC v3 08/10] KVM: arm/arm64: Set up a background timer for the  physical timer emulation Christoffer Dall <cdall@linaro.org> - 2017-02-02 11:40 +0100
  [RFC v3 07/10] KVM: arm/arm64: Set a background timer to the earliest timer expiration Jintack Lim <jintack@cs.columbia.edu> - 2017-02-01 18:50 +0100
    Re: [RFC v3 07/10] KVM: arm/arm64: Set a background timer to the  earliest timer expiration Christoffer Dall <cdall@linaro.org> - 2017-02-02 11:40 +0100
  [RFC v3 03/10] KVM: arm/arm64: Decouple kvm timer functions from virtual timer Jintack Lim <jintack@cs.columbia.edu> - 2017-02-01 18:50 +0100
    Re: [RFC v3 03/10] KVM: arm/arm64: Decouple kvm timer functions from  virtual timer Christoffer Dall <cdall@linaro.org> - 2017-02-02 11:10 +0100
  [RFC v3 02/10] KVM: arm/arm64: Move cntvoff to each timer context Jintack Lim <jintack@cs.columbia.edu> - 2017-02-01 18:50 +0100
    Re: [RFC v3 02/10] KVM: arm/arm64: Move cntvoff to each timer context Christoffer Dall <cdall@linaro.org> - 2017-02-02 11:10 +0100
  [RFC v3 01/10] KVM: arm/arm64: Abstract virtual timer context into separate structure Jintack Lim <jintack@cs.columbia.edu> - 2017-02-01 18:50 +0100
  [RFC v3 06/10] KVM: arm/arm64: Update the physical timer interrupt level Jintack Lim <jintack@cs.columbia.edu> - 2017-02-01 18:50 +0100
    Re: [RFC v3 06/10] KVM: arm/arm64: Update the physical timer  interrupt level Christoffer Dall <cdall@linaro.org> - 2017-02-02 11:20 +0100
  Re: [RFC v3 00/10] Provide the EL1 physical timer to the VM Christoffer Dall <cdall@linaro.org> - 2017-02-02 13:40 +0100
    Re: [RFC v3 00/10] Provide the EL1 physical timer to the VM Jintack Lim <jintack@cs.columbia.edu> - 2017-02-02 16:00 +0100
      Re: [RFC v3 00/10] Provide the EL1 physical timer to the VM Christoffer Dall <cdall@linaro.org> - 2017-02-02 16:10 +0100
      Re: [RFC v3 00/10] Provide the EL1 physical timer to the VM Christoffer Dall <cdall@linaro.org> - 2017-02-03 13:40 +0100
        Re: [RFC v3 00/10] Provide the EL1 physical timer to the VM Jintack Lim <jintack@cs.columbia.edu> - 2017-02-03 14:20 +0100
          Re: [RFC v3 00/10] Provide the EL1 physical timer to the VM Christoffer Dall <cdall@linaro.org> - 2017-02-03 14:40 +0100

csiph-web