1. 14 Sep, 2022 3 commits
    • Alexander Gordeev's avatar
      s390/smp: rework absolute lowcore access · 4df29d2b
      Alexander Gordeev authored
      Temporary unsetting of the prefix page in memcpy_absolute() routine
      poses a risk of executing code path with unexpectedly disabled prefix
      page. This rework avoids the prefix page uninstalling and disabling
      of normal and machine check interrupts when accessing the absolute
      zero memory.
      
      Although memcpy_absolute() routine can access the whole memory, it is
      only used to update the absolute zero lowcore. This rework therefore
      introduces a new mechanism for the absolute zero lowcore access and
      scraps memcpy_absolute() routine for good.
      
      Instead, an area is reserved in the virtual memory that is used for
      the absolute lowcore access only. That area holds an array of 8KB
      virtual mappings - one per CPU. Whenever a CPU is brought online, the
      corresponding item is mapped to the real address of the previously
      installed prefix page.
      
      The absolute zero lowcore access works like this: a CPU calls the
      new primitive get_abs_lowcore() to obtain its 8KB mapping as a
      pointer to the struct lowcore. Virtual address references to that
      pointer get translated to the real addresses of the prefix page,
      which in turn gets swapped with the absolute zero memory addresses
      due to prefixing. Once the pointer is not needed it must be released
      with put_abs_lowcore() primitive:
      
      	struct lowcore *abs_lc;
      	unsigned long flags;
      
      	abs_lc = get_abs_lowcore(&flags);
      	abs_lc->... = ...;
      	put_abs_lowcore(abs_lc, flags);
      
      To ensure the described mechanism works large segment- and region-
      table entries must be avoided for the 8KB mappings. Failure to do
      so results in usage of Region-Frame Absolute Address (RFAA) or
      Segment-Frame Absolute Address (SFAA) large page fields. In that
      case absolute addresses would be used to address the prefix page
      instead of the real ones and the prefixing would get bypassed.
      Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      4df29d2b
    • Alexander Gordeev's avatar
      s390/smp: call smp_reinit_ipl_cpu() before scheduler is available · 6cbd7cc2
      Alexander Gordeev authored
      Currently smp_reinit_ipl_cpu() is a pre-SMP early initcall.
      That ensures no CPU is running in parallel, but still not
      enough to assume the code is exclusive, since the scheduling
      is already available.
      
      Move the function call to arch_call_rest_init() callback
      to ensure no thread could be preempted and allow lockless
      allocation of the kernel page tables. That is needed to
      allow a follow-up rework of the absolute lowcore access
      mechanism.
      Suggested-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      6cbd7cc2
    • Vasily Gorbik's avatar
      Merge branch 'fixes' into features · d61bb30e
      Vasily Gorbik authored
      * fixes:
        s390/smp: enforce lowcore protection on CPU restart
        s390/boot: fix absolute zero lowcore corruption on boot
        s390/hugetlb: fix prepare_hugepage_range() check for 2 GB hugepages
        s390: update defconfigs
        s390: fix nospec table alignments
        s390/mm: remove useless hugepage address alignment
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      d61bb30e
  2. 07 Sep, 2022 4 commits
  3. 30 Aug, 2022 7 commits
  4. 28 Aug, 2022 25 commits
  5. 27 Aug, 2022 1 commit
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 10d4879f
      Linus Torvalds authored
      Pull thermal control fixes from Rafael Wysocki:
       "Fix two issues introduced recently and one driver problem leading to a
        NULL pointer dereference in some cases.
      
        Specifics:
      
         - Add missing EXPORT_SYMBOL_GPL in the thermal core and add back the
           required 'trips' property to the thermal zone DT bindings (Daniel
           Lezcano)
      
         - Prevent the int340x_thermal driver from crashing when a package
           with a buffer of 0 length is returned by an ACPI control method
           evaluated by it (Lee, Chun-Yi)"
      
      * tag 'thermal-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        thermal/int340x_thermal: handle data_vault when the value is ZERO_SIZE_PTR
        dt-bindings: thermal: Fix missing required property
        thermal/core: Add missing EXPORT_SYMBOL_GPL
      10d4879f