Re: [PATCH v1 1/3] KVM: s390: introduce defines for control registers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux