diff options
author | David Hildenbrand <dahi@linux.vnet.ibm.com> | 2016-02-15 09:40:12 +0100 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2016-03-08 13:57:52 +0100 |
commit | 4287f247f6cfaea0ed73b5104e94cd737e1ac0ae (patch) | |
tree | 9a5859846ffe67c80946b70d7fc956f6d5fea481 /arch/s390/kvm/interrupt.c | |
parent | KVM: s390: store cpu id in vcpu->cpu when scheduled in (diff) | |
download | linux-4287f247f6cfaea0ed73b5104e94cd737e1ac0ae.tar.xz linux-4287f247f6cfaea0ed73b5104e94cd737e1ac0ae.zip |
KVM: s390: abstract access to the VCPU cpu timer
We want to manually step the cpu timer in certain scenarios in the future.
Let's abstract any access to the cpu timer, so we can hide the complexity
internally.
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm/interrupt.c')
-rw-r--r-- | arch/s390/kvm/interrupt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 87e2d1a89d74..4604e9accc65 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c @@ -182,8 +182,9 @@ static int cpu_timer_interrupts_enabled(struct kvm_vcpu *vcpu) static int cpu_timer_irq_pending(struct kvm_vcpu *vcpu) { - return (vcpu->arch.sie_block->cputm >> 63) && - cpu_timer_interrupts_enabled(vcpu); + if (!cpu_timer_interrupts_enabled(vcpu)) + return 0; + return kvm_s390_get_cpu_timer(vcpu) >> 63; } static inline int is_ioirq(unsigned long irq_type) |