On Mon, 30 Apr 2018 15:23:01 +0200 David Hildenbrand <david@xxxxxxxxxx> wrote: > On 27.04.2018 14:36, David Hildenbrand wrote: > > In KVM code we use masks to test/set control registers. > > > > Let's define the ones we use in arch/s390/include/asm/ctl_reg.h and > > replace all occurrences in KVM code. > > > > As we will be needing the define for Clock-comparator sign control soon, > > let's also add it. > > > > Suggested-by: Collin L. Walling <walling@xxxxxxxxxxxxxxxxxx> > > Signed-off-by: David Hildenbrand <david@xxxxxxxxxx> > > Just realized that I was sending out an older version of the patch, > (partially updated due to new SIGN bit) the following two hunks are > missing > > diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c > index 5a30fc275a4c..daa09f89ca2d 100644 > --- a/arch/s390/kvm/interrupt.c > +++ b/arch/s390/kvm/interrupt.c > @@ -172,7 +172,7 @@ static int ckc_irq_pending(struct kvm_vcpu *vcpu) > const u64 now = kvm_s390_get_tod_clock_fast(vcpu->kvm); > const u64 ckc = vcpu->arch.sie_block->ckc; > > - if (vcpu->arch.sie_block->gcr[0] & 0x0020000000000000ul) { > + if (vcpu->arch.sie_block->gcr[0] & CR0_CLOCK_COMPARATOR_SIGN) { > if ((s64)ckc >= (s64)now) > return 0; > } else if (ckc >= now) { > @@ -1062,7 +1062,7 @@ static u64 __calculate_sltime(struct kvm_vcpu *vcpu) > u64 cputm, sltime = 0; > > if (ckc_interrupts_enabled(vcpu)) { > - if (vcpu->arch.sie_block->gcr[0] & 0x0020000000000000ul) { > + if (vcpu->arch.sie_block->gcr[0] & CR0_CLOCK_COMPARATOR_SIGN) { > if ((s64)now < (s64)ckc) > sltime = tod_to_ns((s64)ckc - (s64)now); > } else if (now < ckc) { > > > Christian/Janosch, please tell me if you can fix this up by applying > or if I should resend. > Looks even better with that change ;) In any case, my R-b holds. -- To unsubscribe from this list: send the line "unsubscribe linux-s390" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html