summaryrefslogtreecommitdiffstats
path: root/arch/s390
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-linus' of ↵Linus Torvalds2017-05-0291-508/+1495
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Martin Schwidefsky: - three merges for KVM/s390 with changes for vfio-ccw and cpacf. The patches are included in the KVM tree as well, let git sort it out. - add the new 'trng' random number generator - provide the secure key verification API for the pkey interface - introduce the z13 cpu counters to perf - add a new system call to set up the guarded storage facility - simplify TASK_SIZE and arch_get_unmapped_area - export the raw STSI data related to CPU topology to user space - ... and the usual churn of bug-fixes and cleanups. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (74 commits) s390/crypt: use the correct module alias for paes_s390. s390/cpacf: Introduce kma instruction s390/cpacf: query instructions use unique parameters for compatibility with KMA s390/trng: Introduce s390 TRNG device driver. s390/crypto: Provide s390 specific arch random functionality. s390/crypto: Add new subfunctions to the cpacf PRNO function. s390/crypto: Renaming PPNO to PRNO. s390/pageattr: avoid unnecessary page table splitting s390/mm: simplify arch_get_unmapped_area[_topdown] s390/mm: make TASK_SIZE independent from the number of page table levels s390/gs: add regset for the guarded storage broadcast control block s390/kvm: Add use_cmma field to mm_context_t s390/kvm: Add PGSTE manipulation functions vfio: ccw: improve error handling for vfio_ccw_mdev_remove vfio: ccw: remove unnecessary NULL checks of a pointer s390/spinlock: remove compare and delay instruction s390/spinlock: use atomic primitives for spinlocks s390/cpumf: simplify detection of guest samples s390/pci: remove forward declaration s390/pci: increase the PCI_NR_FUNCTIONS default ...
| * Merge branch 's390forkvm' of ↵Martin Schwidefsky2017-04-271-2/+3
| |\ | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into features Pull cpacf changes for KVM from Jason Herne: Add query support for the KMA instruction.
| | * s390/cpacf: Introduce kma instructionJason J. Herne2017-04-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Provide a kma instruction definition for use by callers of __cpacf_query. Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
| | * s390/cpacf: query instructions use unique parameters for compatibility with KMAJason J. Herne2017-04-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The new KMA instruction requires unique parameters. Update __cpacf_query to generate a compatible assembler instruction. Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Acked-by: Harald Freudenberger <freude@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
| * | s390/crypt: use the correct module alias for paes_s390.Harald Freudenberger2017-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | For automatic module loading (e.g. as it is used with cryptsetup) an alias "paes" for the paes_s390 kernel module is needed. Correct the paes_s390 module alias from "aes-all" to "paes". Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/crypto: Provide s390 specific arch random functionality.Harald Freudenberger2017-04-265-1/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces s390 specific arch random functionality. There exists a generic kernel API for arch specific random number implementation (see include/linux/random.h). Here comes the header file and a very small static code part implementing the arch_random_* API based on the TRNG subfunction coming with the reworked PRNG instruction. The arch random implementation hooks into the kernel initialization and checks for availability of the TRNG function. In accordance to the arch random API all functions return false if the TRNG is not available. Otherwise the new high quality entropy source provides fresh random on each invocation. The s390 arch random feature build is controlled via CONFIG_ARCH_RANDOM. This config option located in arch/s390/Kconfig is enabled by default and appears as entry "s390 architectural random number generation API" in the submenu "Processor type and features" for s390 builds. Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/crypto: Add new subfunctions to the cpacf PRNO function.Harald Freudenberger2017-04-261-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a new TRNG extension in the subcodes for the cpacf PRNO function. This patch introduces new defines and a new cpacf_trng inline function to provide these new features for other kernel code parts. Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/crypto: Renaming PPNO to PRNO.Harald Freudenberger2017-04-263-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PPNO (Perform Pseudorandom Number Operation) instruction has been renamed to PRNO (Perform Random Number Operation). To avoid confusion and conflicts with future extensions with this instruction (like e.g. provide a true random number generator) this patch renames all occurences in cpacf.h and adjusts the only exploiter code which is the prng device driver and one line in the s390 kvm feature check. Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/pageattr: avoid unnecessary page table splittingHeiko Carstens2017-04-261-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel page table splitting code will split page tables even for features the CPU does not support. E.g. a CPU may not support the NX feature. In order to avoid this, remove those bits from the flags parameter that correlate with unsupported CPU features within __set_memory(). In addition add an early exit if the flags parameter does not have any bits set afterwards. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/mm: simplify arch_get_unmapped_area[_topdown]Martin Schwidefsky2017-04-251-57/+32Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | With TASK_SIZE now reflecting the maximum size of the address space for a process the code for arch_get_unmapped_area[_topdown] can be simplified. Just let the logic pick a suitable address and deal with the page table upgrade after the address has been selected. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/mm: make TASK_SIZE independent from the number of page table levelsMartin Schwidefsky2017-04-257-33/+21Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | The TASK_SIZE for a process should be maximum possible size of the address space, 2GB for a 31-bit process and 8PB for a 64-bit process. The number of page table levels required for a given memory layout is a consequence of the mapped memory areas and their location. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/gs: add regset for the guarded storage broadcast control blockMartin Schwidefsky2017-04-211-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | The guarded storage interface allows to register a control block for each thread that is activated with the guarded storage broadcast event. To retrieve the complete state of a process from the kernel a register set for the stored broadcast control block is required. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/kvm: Add use_cmma field to mm_context_tClaudio Imbrenda2017-04-202-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add use_cmma field to mm_context_t, like we do for storage keys. Signed-off-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com> Acked-by: Janosch Frank <frankja@de.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/kvm: Add PGSTE manipulation functionsClaudio Imbrenda2017-04-204-6/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add PGSTE manipulation functions: * set_pgste_bits sets specific bits in a PGSTE * get_pgste returns the whole PGSTE * pgste_perform_essa manipulates a PGSTE to set specific storage states * ESSA_[SG]ET_* macros used to indicate the action for manipulate_pgste Signed-off-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com> Reviewed-by: Janosch Frank <frankja@de.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/spinlock: remove compare and delay instructionMartin Schwidefsky2017-04-123-45/+13Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CAD instruction never worked quite as expected for the spinlock code. It has been disabled by default with git commit 61b0b01686d48220, if the "cad" kernel parameter is specified it is enabled for both user space and the spinlock code. Leave the option to enable the instruction for user space but remove it from the spinlock code. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/spinlock: use atomic primitives for spinlocksMartin Schwidefsky2017-04-124-76/+70Star
| | | | | | | | | | | | | | | | | | | | | | | | Add a couple more __atomic_xxx function to atomic_ops.h and use them to replace the compare-and-swap inlines in the spinlock code. This changes the type of the lock value from unsigned int to int. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/cpumf: simplify detection of guest samplesMartin Schwidefsky2017-04-053-9/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are three different code levels in regard to the identification of guest samples. They differ in the way the LPP instruction is used. 1) Old kernels without the LPP instruction. The guest program parameter is always zero. 2) Newer kernels load the process pid into the program parameter with LPP. The guest program parameter is non-zero if the guest executes in a process != idle. 3) The latest kernels load ((1UL << 31) | pid) with LPP to make the value non-zero even for the idle task. The guest program parameter is non-zero if the guest is running. All kernels load the process pid to CR4 on context switch. The CPU sampling code uses the value in CR4 to decide between guest and host samples in case the guest program parameter is zero. The three cases: 1) CR4==pid, gpp==0 2) CR4==pid, gpp==pid 3) CR4==pid, gpp==((1UL << 31) | pid) The load-control instruction to load the pid into CR4 is expensive and the goal is to remove it. To distinguish the host CR4 from the guest pid for the idle process the maximum value 0xffff for the PASN is used. This adds a fourth case for a guest OS with an updated kernel: 4) CR4==0xffff, gpp=((1UL << 31) | pid) The host kernel will have CR4==0xffff and will use (gpp!=0 || CR4!==0xffff) to identify guest samples. This works nicely with all 4 cases, the only possible issue would be a guest with an old kernel (gpp==0) and a process pid of 0xffff. Well, don't do that.. Suggested-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/pci: remove forward declarationSebastian Ott2017-04-051-8/+5Star
| | | | | | | | | | | | | | | | | | | | | Move a struct definition to get rid of a forward declaration. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/pci: increase the PCI_NR_FUNCTIONS defaultSebastian Ott2017-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users complained that they are hitting the limit of 64 functions (some physical functions can spawn lots of virtual functions). Double the default limit. With the latest savings in static data usage this increases the image size by only 520 bytes. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/pci: reduce iomap size (even more)Sebastian Ott2017-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Commit c506fff3d3a8 ("s390/pci: resize iomap") reduced the iomap to NR_FUNCTIONS * PCI_BAR_COUNT elements. Since we only support functions with 64bit BARs we can cut that number in half. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/pci: remove duplicated defineSebastian Ott2017-04-051-2/+0Star
| | | | | | | | | | | | | | | | | | | | | Address space identifiers are already defined in <asm/pci_insn.h>. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/pci: remove unused functionSebastian Ott2017-04-051-5/+0Star
| | | | | | | | | | | | | | | | | | | | | barsize was never used. Get rid of it. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390: use 64-bit lctlg to load task pid to cr4 on context switchMartin Schwidefsky2017-04-051-1/+3
| | | | | | | | | | | | | | | | | | | | | The 32-bit lctl instruction is quite a bit slower than the 64-bit counter part lctlg. Use the faster instruction. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | Merge branch 'vfio-ccw-for-martin' of ↵Martin Schwidefsky2017-03-313-0/+29
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw into features Pull vfio-ccw branch to add the basic channel I/O passthrough intrastructure based on vfio. The focus is on supporting dasd-eckd(cu_type/dev_type = 0x3990/0x3390) as the target device. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| | * | vfio: ccw: introduce support for ccw0Dong Jia Shi2017-03-311-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although Linux does not use format-0 channel command words (CCW0) these are a non-optional part of the platform spec, and for the sake of platform compliance, and possibly some non-Linux guests, we have to support CCW0. Making the kernel execute a format 0 channel program is too much hassle because we would need to allocate and use memory which can be addressed by 24 bit physical addresses (because of CCW0.cda). So we implement CCW0 support by translating the channel program into an equivalent CCW1 program instead. Based upon an orginal patch by Kai Yue Wang. Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> Message-Id: <20170317031743.40128-16-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
| | * | vfio: ccw: register vfio_ccw to the mediated device frameworkDong Jia Shi2017-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To make vfio support subchannel devices, we need to leverage the mediated device framework to create a mediated device for the subchannel device. This registers the subchannel device to the mediated device framework during probe to enable mediated device creation. Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com> Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> Message-Id: <20170317031743.40128-7-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
| | * | vfio: ccw: basic implementation for vfio_ccw driverDong Jia Shi2017-03-312-0/+11
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To make vfio support subchannel devices, we need a css driver for the vfio subchannels. This patch adds a basic vfio-ccw subchannel driver for this purpose. To enable VFIO for vfio-ccw, enable S390_CCW_IOMMU config option and configure VFIO as required. Acked-by: Pierre Morel <pmorel@linux.vnet.ibm.com> Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com> Message-Id: <20170317031743.40128-5-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
| * | s390/cpum_cf: make hw_perf_event_update() a void functionHendrik Brueckner2017-03-311-4/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The return code of hw_perf_event_update() is not evaluated by its callers. Hence, simplify the function by removing the return code. Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/cpu_mf: remove register variable in __ecctr()Hendrik Brueckner2017-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Using a register variable for r4 is not necessary. Let the compiler decide the register to be used. Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/cpum_cf: correct variable naming (cleanup)Hendrik Brueckner2017-03-311-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | Make clear that the event definitions relate to the counter facility (cf) and not to the sampling facility (sf). Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/cpum_cf: add IBM z13 counter event namesHendrik Brueckner2017-03-311-7/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the event names for the IBM z13/z13s specific CPU-MF counters. Also improve the merging of the generic and model specific events so that their sysfs attribute definitions completely reside in memory. Hence, flagging the generic event attribute definitions as initdata too. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/cpum_cf: add support for the MT-diagnostic counter set (z13)Hendrik Brueckner2017-03-312-26/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | Complete the IBM z13 support and support counters from the MT-diagnostic counter set. Note that this counter set is available only if SMT is enabled. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/cpum_cf: cleanup event/counter validationHendrik Brueckner2017-03-311-30/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The validate_event() function just checked for reserved counters in particular CPU-MF counter sets. Because the number of counters in counter sets vary among different hardware models, remove the explicit check to tolerate new models. Reserved counters are not accounted and, thus, will return zero. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/cpum_cf: update counter numbers to ecctr limitsHendrik Brueckner2017-03-312-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Use the highest counter number that can be specified for the ecctr (extract CPU counter) instruction for perf. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390: use generic headers if possibleHeiko Carstens2017-03-307-16/+6Star
| | | | | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/uapi: use generic headers if possibleHeiko Carstens2017-03-3010-59/+10Star
| | | | | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390: make MAX_PHYSMEM_BITS configurableHeiko Carstens2017-03-282-1/+11
| | | | | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390: enable ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INITHeiko Carstens2017-03-284-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deferred struct page initialization works on s390. However it makes only sense for the fake numa case, since the kthreads that initialize struct pages are started per node. Without fake numa there is just a single node and therefore no gain. However there is no reason to not enable this feature. Therefore select the config option and enable the feature in all config files. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/kdump: Add final noteMichael Holzheu2017-03-281-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since linux v3.14 with commit 38dfac843cb6d7be1 ("vmcore: prevent PT_NOTE p_memsz overflow during header update") on s390 we get the following message in the kdump kernel: Warning: Exceeded p_memsz, dropping PT_NOTE entry n_namesz=0x6b6b6b6b, n_descsz=0x6b6b6b6b The reason for this is that we don't create a final zero note in the ELF header which the proc/vmcore code uses to find out the end of the notes section (see also kernel/kexec_core.c:final_note()). It still worked on s390 by chance because we (most of the time?) have the byte pattern 0x6b6b6b6b after the notes section which also makes the notes parsing code stop in update_note_header_size_elf64() because 0x6b6b6b6b is interpreded as note size: if ((real_sz + sz) > max_sz) { pr_warn("Warning: Exceeded p_memsz, dropping P ...); break; } So fix this and add the missing final note to the ELF header. We don't have to adjust the memory size for ELF header ("alloc_size") because the new ELF note still fits into the 0x1000 base memory. Cc: stable@vger.kernel.org # v4.4+ Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390: remove HAVE_ARCH_EARLY_PFN_TO_NID select statementHeiko Carstens2017-03-281-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HAVE_ARCH_EARLY_PFN_TO_NID selects a not present Kconfig option. Therefore remove it. Given that the first call of early_pfn_to_nid() happens after numa_setup() finished to establish the memory to node mapping, there is no need to implement an architecture private version of __early_pfn_to_nid() like (only) ia64 does. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/mm: Remove double gaddr calculation when notifyingJanosch Frank2017-03-241-21/+14Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ptep_notify and gmap_shadow_notify both need a guest address and therefore retrieve them from the available virtual host address. As they operate on the same guest address, we can calculate it once and then pass it on. As a gmap normally has more than one shadow gmap, we also do not recalculate for each of them any more. Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/facilities: get rid of __ASSEMBLY__ in facility header fileHeiko Carstens2017-03-222-5/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need for the __ASSEMBLY__ ifdefery anymore since the architecture level set code that deals with facility bits was converted to C in the meantime. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/facilites: use stfle_fac_list array size for MAX_FACILITY_BITHeiko Carstens2017-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the actual size of the facility list array within the lowcore structure for the MAX_FACILITY_BIT define instead of a comment which states what this is good for. This makes it a bit harder to break things. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/sysinfo: provide remaining stsi information via debugfsHeiko Carstens2017-03-221-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide the remaining stsi information via debugfs files. This also might be useful for debugging purposes. Suggested-by: Christian Borntraeger <borntraeger@de.ibm.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/sysinfo,topology: provide raw stsi 15,1,x data via debugfsHeiko Carstens2017-03-223-1/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide the raw stsi 15,1,x data contents via debugfs. This makes it much easier to debug unexpected scheduling domains on machines that provide cpu topology information. Therefore this file adds a new 's390/stsi' debugfs directory with a file for each possible topology nesting level that is allowed by the architecture. The files will be created regardless if the machine supports all, or any, level. If a level is not supported, or no data is available, user space can recognize this with a -EINVAL error code when trying to read such data. In addition a 'topology' symlink is created that points to the file that contains the data that is used to create the scheduling domains. Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/debugfs: introduce top-level 's390' directoryHeiko Carstens2017-03-222-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a top-level 's390' directory which should be used when adding new s390 specific debug feature files and/or directories. This makes hopefully sure that the contents of the s390 directory will be a bit more structured. Right now we have a couple of top-level files where it is not easy to tell to which subsystem they belong to. Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/pkey: Introduce new API for secure key verificationHarald Freudenberger2017-03-222-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | User space needs some information about the secure key(s) before actually invoking the pkey and/or paes funcionality. This patch introduces a new ioctl API and in kernel API to verify the the secure key blob and give back some information about the key (type, bitsize, old MKVP). Both APIs are described in detail in the header files arch/s390/include/asm/pkey.h and arch/s390/include/uapi/asm/pkey.h. Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/configs//zfcpdump_defconfig: Remove CONFIG_SCSI_SRP_ATTRSMichael Holzheu2017-03-221-1/+0Star
| | | | | | | | | | | | | | | Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/dump_stack: use control program identification stringHeiko Carstens2017-03-221-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If running within a level 3 hypervisor, the hypervisor provides a SYSIB block which contains a control program indentifier string. Use this string instead of the simple KVM and z/VM strings only. In case of z/VM this provides addtional information: the z/VM version. The new string looks similar to this: Hardware name: IBM 2964 N96 702 (z/VM 6.4.0) Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
| * | s390/dump_stack: remove whitespace from arch descriptionHeiko Carstens2017-03-221-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The arch description provided for the "Hardware name:" contains lots of extra whitespace due to the way the SYSIB contents are defined (strings aren't zero terminated). This looks a bit odd and therefore remove the extra whitespace characters. This also gives the opportunity to add more information, if required, without hitting the magic 80 characters per line limit. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>