]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 5 Sep 2017 16:45:46 +0000 (09:45 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 5 Sep 2017 16:45:46 +0000 (09:45 -0700)
Pull s390 updates from Martin Schwidefsky:
 "The first part of the s390 updates for 4.14:

   - Add machine type 0x3906 for IBM z14

   - Add IBM z14 TLB flushing improvements for KVM guests

   - Exploit the TOD clock epoch extension to provide a continuous TOD
     clock afer 2042/09/17

   - Add NIAI spinlock hints for IBM z14

   - Rework the vmcp driver and use CMA for the respone buffer of z/VM
     CP commands

   - Drop some s390 specific asm headers and use the generic version

   - Add block discard for DASD-FBA devices under z/VM

   - Add average request times to DASD statistics

   - A few of those constify patches which seem to be in vogue right now

   - Cleanup and bug fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (50 commits)
  s390/mm: avoid empty zero pages for KVM guests to avoid postcopy hangs
  s390/dasd: Add discard support for FBA devices
  s390/zcrypt: make CPRBX const
  s390/uaccess: avoid mvcos jump label
  s390/mm: use generic mm_hooks
  s390/facilities: fix typo
  s390/vmcp: simplify vmcp_response_free()
  s390/topology: Remove the unused parent_node() macro
  s390/dasd: Change unsigned long long to unsigned long
  s390/smp: convert cpuhp_setup_state() return code to zero on success
  s390: fix 'novx' early parameter handling
  s390/dasd: add average request times to dasd statistics
  s390/scm: use common completion path
  s390/pci: log changes to uid checking
  s390/vmcp: simplify vmcp_ioctl()
  s390/vmcp: return -ENOTTY for unknown ioctl commands
  s390/vmcp: split vmcp header file and move to uapi
  s390/vmcp: make use of contiguous memory allocator
  s390/cpcmd,vmcp: avoid GFP_DMA allocations
  s390/vmcp: fix uaccess check and avoid undefined behavior
  ...

1  2 
Documentation/admin-guide/kernel-parameters.txt
arch/s390/include/asm/mmu_context.h
arch/s390/include/asm/spinlock.h
arch/s390/include/asm/tlb.h

index 591d48f3a7de3614a3175934bbe808e80b9902f5,5a2d5079139b050cf06f2a31b4965b8bdd17531a..6996b7727b85227a10f7404828756909afaee0fd
                        memory contents and reserves bad memory
                        regions that are detected.
  
 +      mem_encrypt=    [X86-64] AMD Secure Memory Encryption (SME) control
 +                      Valid arguments: on, off
 +                      Default (depends on kernel configuration option):
 +                        on  (CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT=y)
 +                        off (CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT=n)
 +                      mem_encrypt=on:         Activate SME
 +                      mem_encrypt=off:        Do not activate SME
 +
 +                      Refer to Documentation/x86/amd-memory-encryption.txt
 +                      for details on when memory encryption can be activated.
 +
        mem_sleep_default=      [SUSPEND] Default system suspend mode:
                        s2idle  - Suspend-To-Idle
                        shallow - Power-On Suspend or equivalent (if supported)
                        In kernels built with CONFIG_NO_HZ_FULL=y, set
                        the specified list of CPUs whose tick will be stopped
                        whenever possible. The boot CPU will be forced outside
 -                      the range to maintain the timekeeping.
 -                      The CPUs in this range must also be included in the
 -                      rcu_nocbs= set.
 +                      the range to maintain the timekeeping.  Any CPUs
 +                      in this list will have their RCU callbacks offloaded,
 +                      just as if they had also been called out in the
 +                      rcu_nocbs= boot parameter.
  
        noiotrap        [SH] Disables trapped I/O port accesses.
  
        nopat           [X86] Disable PAT (page attribute table extension of
                        pagetables) support.
  
 +      nopcid          [X86-64] Disable the PCID cpu feature.
 +
        norandmaps      Don't use address space randomization.  Equivalent to
                        echo 0 > /proc/sys/kernel/randomize_va_space
  
                        Run specified binary instead of /init from the ramdisk,
                        used for early userspace startup. See initrd.
  
 +      rdt=            [HW,X86,RDT]
 +                      Turn on/off individual RDT features. List is:
 +                      cmt, mbmtotal, mbmlocal, l3cat, l3cdp, l2cat, mba.
 +                      E.g. to turn on cmt and turn off mba use:
 +                              rdt=cmt,!mba
 +
        reboot=         [KNL]
                        Format (x86 or x86_64):
                                [w[arm] | c[old] | h[ard] | s[oft] | g[pio]] \
                        decrease the size and leave more room for directly
                        mapped kernel RAM.
  
+       vmcp_cma=nn[MG] [KNL,S390]
+                       Sets the memory size reserved for contiguous memory
+                       allocations for the vmcp device driver.
        vmhalt=         [KNL,S390] Perform z/VM CP command after system halt.
                        Format: <command>
  
index 24bc41622a983cf353c6d414d521cbd94cd43cbb,31eea626148851454cbf9587068e52418bf307bf..72e9ca83a6687873787ac7eb656c73aaf8dbc42e
@@@ -12,6 -12,7 +12,7 @@@
  #include <linux/mm_types.h>
  #include <asm/tlbflush.h>
  #include <asm/ctl_reg.h>
+ #include <asm-generic/mm_hooks.h>
  
  static inline int init_new_context(struct task_struct *tsk,
                                   struct mm_struct *mm)
@@@ -33,7 -34,7 +34,7 @@@
        mm->context.use_cmma = 0;
  #endif
        switch (mm->context.asce_limit) {
-       case 1UL << 42:
+       case _REGION2_SIZE:
                /*
                 * forked 3-level task, fall through to set new asce with new
                 * mm->pgd
                mm->context.asce = __pa(mm->pgd) | _ASCE_TABLE_LENGTH |
                                   _ASCE_USER_BITS | _ASCE_TYPE_REGION3;
                break;
-       case 1UL << 53:
 +      case -PAGE_SIZE:
 +              /* forked 5-level task, set new asce with new_mm->pgd */
 +              mm->context.asce = __pa(mm->pgd) | _ASCE_TABLE_LENGTH |
 +                      _ASCE_USER_BITS | _ASCE_TYPE_REGION1;
 +              break;
+       case _REGION1_SIZE:
                /* forked 4-level task, set new asce with new mm->pgd */
                mm->context.asce = __pa(mm->pgd) | _ASCE_TABLE_LENGTH |
                                   _ASCE_USER_BITS | _ASCE_TYPE_REGION2;
                break;
-       case 1UL << 31:
+       case _REGION3_SIZE:
                /* forked 2-level compat task, set new asce with new mm->pgd */
                mm->context.asce = __pa(mm->pgd) | _ASCE_TABLE_LENGTH |
                                   _ASCE_USER_BITS | _ASCE_TYPE_SEGMENT;
@@@ -138,30 -134,4 +139,4 @@@ static inline void activate_mm(struct m
        set_user_asce(next);
  }
  
- static inline void arch_dup_mmap(struct mm_struct *oldmm,
-                                struct mm_struct *mm)
- {
- }
- static inline void arch_exit_mmap(struct mm_struct *mm)
- {
- }
- static inline void arch_unmap(struct mm_struct *mm,
-                       struct vm_area_struct *vma,
-                       unsigned long start, unsigned long end)
- {
- }
- static inline void arch_bprm_mm_init(struct mm_struct *mm,
-                                    struct vm_area_struct *vma)
- {
- }
- static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,
-               bool write, bool execute, bool foreign)
- {
-       /* by default, allow everything */
-       return true;
- }
  #endif /* __S390_MMU_CONTEXT_H */
index 217ee5210c32ea0845d98deff7436f6d2e84b215,339e450b0567d3420d48528dac2aa6c7fa754f4c..8182b521c42f010e94e6c06e9a49e6f32bf307da
@@@ -92,12 -92,20 +92,13 @@@ static inline void arch_spin_unlock(arc
  {
        typecheck(int, lp->lock);
        asm volatile(
-               "st     %1,%0\n"
-               : "+Q" (lp->lock)
-               : "d" (0)
-               : "cc", "memory");
+ #ifdef CONFIG_HAVE_MARCH_ZEC12_FEATURES
+               "       .long   0xb2fa0070\n"   /* NIAI 7 */
+ #endif
+               "       st      %1,%0\n"
+               : "=Q" (lp->lock) : "d" (0) : "cc", "memory");
  }
  
 -static inline void arch_spin_unlock_wait(arch_spinlock_t *lock)
 -{
 -      while (arch_spin_is_locked(lock))
 -              arch_spin_relax(lock);
 -      smp_acquire__after_ctrl_dep();
 -}
 -
  /*
   * Read-write spinlocks, allowing multiple readers
   * but only one writer.
index 2eb8ff0d6fca443543c32ac80ff690b4b67be1ef,950af48e88be377102bcb6ee1d554f75ce85e2f4..3a14b864b2e30af5b1f1867ae59b069926a07d9d
@@@ -47,9 -47,10 +47,9 @@@ struct mmu_table_batch 
  extern void tlb_table_flush(struct mmu_gather *tlb);
  extern void tlb_remove_table(struct mmu_gather *tlb, void *table);
  
 -static inline void tlb_gather_mmu(struct mmu_gather *tlb,
 -                                struct mm_struct *mm,
 -                                unsigned long start,
 -                                unsigned long end)
 +static inline void
 +arch_tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm,
 +                      unsigned long start, unsigned long end)
  {
        tlb->mm = mm;
        tlb->start = start;
@@@ -75,15 -76,9 +75,15 @@@ static inline void tlb_flush_mmu(struc
        tlb_flush_mmu_free(tlb);
  }
  
 -static inline void tlb_finish_mmu(struct mmu_gather *tlb,
 -                                unsigned long start, unsigned long end)
 +static inline void
 +arch_tlb_finish_mmu(struct mmu_gather *tlb,
 +              unsigned long start, unsigned long end, bool force)
  {
 +      if (force) {
 +              tlb->start = start;
 +              tlb->end = end;
 +      }
 +
        tlb_flush_mmu(tlb);
  }
  
@@@ -135,7 -130,7 +135,7 @@@ static inline void pte_free_tlb(struct 
  static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd,
                                unsigned long address)
  {
-       if (tlb->mm->context.asce_limit <= (1UL << 31))
+       if (tlb->mm->context.asce_limit <= _REGION3_SIZE)
                return;
        pgtable_pmd_page_dtor(virt_to_page(pmd));
        tlb_remove_table(tlb, pmd);
  static inline void p4d_free_tlb(struct mmu_gather *tlb, p4d_t *p4d,
                                unsigned long address)
  {
-       if (tlb->mm->context.asce_limit <= (1UL << 53))
+       if (tlb->mm->context.asce_limit <= _REGION1_SIZE)
                return;
        tlb_remove_table(tlb, p4d);
  }
  static inline void pud_free_tlb(struct mmu_gather *tlb, pud_t *pud,
                                unsigned long address)
  {
-       if (tlb->mm->context.asce_limit <= (1UL << 42))
+       if (tlb->mm->context.asce_limit <= _REGION2_SIZE)
                return;
        tlb_remove_table(tlb, pud);
  }