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 14:49:44 +0200
Janosch Frank <frankja@xxxxxxxxxxxxx> wrote:

> On 30.04.2018 14:40, Cornelia Huck wrote:
> > On Fri, 27 Apr 2018 14:36:11 +0200
> > David Hildenbrand <david@xxxxxxxxxx> 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>
> >> ---
> >>  arch/s390/include/asm/ctl_reg.h | 12 ++++++++++++
> >>  arch/s390/kvm/guestdbg.c        |  2 +-
> >>  arch/s390/kvm/interrupt.c       | 16 ++++++++--------
> >>  arch/s390/kvm/kvm-s390.c        | 10 +++++++---
> >>  4 files changed, 28 insertions(+), 12 deletions(-)
> >>
> >> diff --git a/arch/s390/include/asm/ctl_reg.h b/arch/s390/include/asm/ctl_reg.h
> >> index 99c93d0346f9..4600453536c2 100644
> >> --- a/arch/s390/include/asm/ctl_reg.h
> >> +++ b/arch/s390/include/asm/ctl_reg.h
> >> @@ -10,8 +10,20 @@
> >>  
> >>  #include <linux/const.h>
> >>  
> >> +#define CR0_CLOCK_COMPARATOR_SIGN	_BITUL(63 - 10)
> >> +#define CR0_EMERGENCY_SIGNAL_SUBMASK	_BITUL(63 - 49)
> >> +#define CR0_EXTERNAL_CALL_SUBMASK	_BITUL(63 - 50)
> >> +#define CR0_CLOCK_COMPARATOR_SUBMASK	_BITUL(63 - 52)
> >> +#define CR0_CPU_TIMER_SUBMASK		_BITUL(63 - 53)
> >> +#define CR0_SERVICE_SIGNAL_SUBMASK	_BITUL(63 - 54)
> >> +#define CR0_UNUSED_56			_BITUL(63 - 56)
> >> +#define CR0_INTERRUPT_KEY_SUBMASK	_BITUL(63 - 57)
> >> +#define CR0_MEASUREMENT_ALERT_SUBMASK	_BITUL(63 - 58)
> >> +
> >>  #define CR2_GUARDED_STORAGE		_BITUL(63 - 59)
> >>  
> >> +#define CR14_UNUSED_32			_BITUL(63 - 32)
> >> +#define CR14_UNUSED_33			_BITUL(63 - 33)  
> > 
> > These 'unused' values look a bit odd, but keep the masks unchanged :)
> > (The respective values do not seem to be in the public documentation
> > afaics?)  
> 
> 56 is in the POP and is 1 initialized for compat 370 reasons. The cr14
> ones are defined like that too. Have a look at the explanations at the
> bottom of the table for figure 4 - 5.

Ah, thanks. Did not find that table (I was looking at the actual
effects the bits are having.)
--
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