1. 18 5月, 2023 4 次提交
    • Z
      userswap: introduce MREMAP_USWAP_SET_PTE to remap for swapping out · c97cdd7e
      ZhangPeng 提交于
      hulk inclusion
      category: feature
      bugzilla: https://gitee.com/openeuler/kernel/issues/I6CAIM
      
      --------------------------------
      
      We introduce MREMAP_USWAP_SET_PTE to implement remapping in the swap-out
      phase. Unmap the pages between 'addr ~ addr+old_len' and remap them to
      'new_addr ~ new_addr+new_len'. During unmapping, the PTE of old_addr is
      set to SWP_USERSWAP_ENTRY.
      Signed-off-by: NZhangPeng <zhangpeng362@huawei.com>
      c97cdd7e
    • Z
      userswap: introduce UFFDIO_COPY_MODE_DIRECT_MAP to map without copying · 444ec524
      ZhangPeng 提交于
      hulk inclusion
      category: feature
      bugzilla: https://gitee.com/openeuler/kernel/issues/I6CAIM
      
      --------------------------------
      
      Add a new UFFDIO_COPY mode UFFDIO_COPY_MODE_DIRECT_MAP to map physical
      pages without copy_from_user().
      We introduce uswap_unmap_anon_page() to unmap an anonymous page and
      uswap_map_anon_page() to map page to src addr. We also introduce
      mfill_atomic_pte_nocopy() to achieve zero copy by unmapping src_addr to the
      physical page and establishing the mapping from dst_addr to the physical
      page.
      Signed-off-by: NZhangPeng <zhangpeng362@huawei.com>
      444ec524
    • O
      !766 LoongArch: add kexec&kdump support · c098198d
      openeuler-ci-bot 提交于
      Merge Pull Request from: @Hongchen_Zhang 
       
      
      
      ```
      This series of patches adds the kexec/kdump feature of the LoongArch
      architecture.
      
      The production kernel and capture kernel can be the same kernel with
      the same binary implementation added. However, this implementation
      depends on the kernel relocation function, so the kernel relocation
      implementation and KASLR features are added to this series of patches.
      
      In order to be able to be used normally in machines compatible with the
      old interface specification, compatibility with the old interface
      specification has also been added.
      
      Manual command line test:
      kexec:
       $ sudo kexec -l vmlinuz --reuse-cmdline --initrd=initrd
       $ sudo kexec -e
      
      kdump:
      Add crashkernel=512M parameter in grub.cfg,
       $ sudo kexec -p vmlinuz --reuse-cmdline --initrd=initrd
       # echo c > /proc/sysrq-trigger
      
      
      kdump service mode test:
      kexec:
       $ sudo kexec -l vmlinuz --reuse-cmdline --initrd=initrd
       $ sudo kexec -e
      
      kdump:
      Add crashkernel=512M parameter in grub.cfg,
       $ sudo systemctl enable kdump
       $ sudo systemctl restart kdump
       # echo c > /proc/sysrq-trigger
      
      ```
       
       
      Link:https://gitee.com/openeuler/kernel/pulls/766 
      
      Reviewed-by: Guo Dongtai <guodongtai@kylinos.cn> 
      Reviewed-by: Jialin Zhang <zhangjialin11@huawei.com> 
      Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com> 
      c098198d
    • O
      !758 net: hns3: Backport wol feature and some hns3 bugfix · 36c3e5ca
      openeuler-ci-bot 提交于
      Merge Pull Request from: @svishen 
       
      The patch sorted out the differences between the wol feature in the Linux mainline version and the openeuler and fix some bugfix
      
      issue:
      https://gitee.com/openeuler/kernel/issues/I72OPH 
       
      Link:https://gitee.com/openeuler/kernel/pulls/758 
      
      Reviewed-by: Jialin Zhang <zhangjialin11@huawei.com> 
      Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com> 
      36c3e5ca
  2. 17 5月, 2023 8 次提交
  3. 16 5月, 2023 27 次提交
  4. 15 5月, 2023 1 次提交
    • Y
      LoongArch: Fix kdump failure on v40 interface specification · f45a5a99
      Youling Tang 提交于
      LoongArch inclusion
      category: feature
      bugzilla: https://gitee.com/openeuler/kernel/issues/I736HO
      
      --------------------------------
      
      The old memory should be reserved after efi_runtime_init() to avoid destroying
      the EFI space and causing failure when executing svam().
      
      Fix the following problems when executing kdump:
      
      [    0.000000] The BIOS Version: Loongson-UDK2018-V2.0.04082-beta7
      [    0.000000] CPU 0 Unable to handle kernel paging request at virtual address 00000000fdeb0e7c, era == 00000000fdeb0e7c, ra == 90000000dae6585c
      [    0.000000] Oops[#1]:
      [    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.10.137+ #86
      [    0.000000] Hardware name: Loongson Loongson-3A5000-7A1000-1w-A2101/Loongson-LS3A5000-7A1000-1w-A2101, BIOS vUDK2018-LoongArch-V2.0.pre-beta8 06/15/2022
      [    0.000000] $ 0   : 0000000000000000 90000000dae6585c 90000000db200000 90000000db203840
      [    0.000000] $ 4   : 0000000000000078 0000000000000028 0000000000000001 00000000db203860
      [    0.000000] $ 8   : 0000000000000000 0000000000000040 90000000db203680 0000000000000000
      [    0.000000] $12   : 00000000fdeb0e7c ffffffffffffffc0 00000000fbffffff 0000000020000000
      [    0.000000] $16   : 000000000003e780 0000000020000000 90000000dad8c348 0000000000003fff
      [    0.000000] $20   : 0000000000000018 90000000dad8bdd0 90000000db203850 0000000000000040
      [    0.000000] $24   : 000000000000000f 90000000db21a570 90000000daeb07a0 90000000db217000
      [    0.000000] $28   : 90000000db203858 0000000001ffffff 90000000db2171b0 0000000000000040
      [    0.000000] era   : 00000000fdeb0e7c 0xfdeb0e7c
      [    0.000000] ra    : 90000000dae6585c set_virtual_map.isra.0+0x23c/0x394
      [    0.000000] CSR crmd: 90000000db21a570
      [    0.000000] CSR prmd: 00000000
      [    0.000000] CSR euen: 00000000
      [    0.000000] CSR ecfg: 90000000db203850
      [    0.000000] CSR estat: 90000000dae65800
      [    0.000000] ExcCode : 26 (SubCode 16b)
      [    0.000000] PrId  : 0014c012 (Loongson-64bit)
      [    0.000000] Modules linked in:
      [    0.000000] Process swapper (pid: 0, threadinfo=(____ptrval____), task=(____ptrval____))
      [    0.000000] Stack : 0000000000000001 00000000fdeb0e7c 0000000000036780 000000000003e780
      [    0.000000]         0000000000000006 0000000010000000 8000000010000000 0000000000010000
      [    0.000000]         8000000000000001 0000000000000005 00000000fde40000 90000000fde40000
      [    0.000000]         0000000000000100 800000000000000f 0000000000000006 00000000fdf40000
      [    0.000000]         90000000fdf40000 0000000000000300 800000000000000f 00000000000000b0
      [    0.000000]         0000000000000001 90000000da094cf0 0000000000000000 ffffffffffffffea
      [    0.000000]         90000000db2039b8 ffff0a1000000609 0000000000000035 0000000000000030
      [    0.000000]         90000000dad7b258 0000000000000400 00000000000000b0 ffff0a1000000609
      [    0.000000]         90000000db2039a8 90000000db095730 000000007fffffff ffff0a1000000609
      [    0.000000]         90000000db203a90 90000000db203a30 90000000db2039d8 90000000db09570b
      [    0.000000]         ...
      [    0.000000] Call Trace:
      [    0.000000]
      [    0.000000] Code: (Bad address in era)
      [    0.000000]
      [    0.000000]
      Signed-off-by: NYouling Tang <tangyouling@loongson.cn>
      Change-Id: I1cdf06f520fd16fa2c2dcc6b852d76d038771a86
      f45a5a99