aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c
diff options
context:
space:
mode:
authorChenghao Duan <[email protected]>2025-08-05 11:00:18 +0000
committerHuacai Chen <[email protected]>2025-08-05 11:00:18 +0000
commit9fbd18cf4c69f512f7de3ab73235078f3e32ecec (patch)
treecb9f968dafa0a2544a74c262fff54806226217c9 /drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c
parentLoongArch: BPF: Rename and refactor validate_code() (diff)
downloadkernel-9fbd18cf4c69f512f7de3ab73235078f3e32ecec.tar.gz
kernel-9fbd18cf4c69f512f7de3ab73235078f3e32ecec.zip
LoongArch: BPF: Add dynamic code modification support
This commit adds support for BPF dynamic code modification on the LoongArch architecture: 1. Add bpf_arch_text_copy() for instruction block copying. 2. Add bpf_arch_text_poke() for runtime instruction patching. 3. Add bpf_arch_text_invalidate() for code invalidation. On LoongArch, since symbol addresses in the direct mapping region can't be reached via relative jump instructions from the paged mapping region, we use the move_imm+jirl instruction pair as absolute jump instructions. These require 2-5 instructions, so we reserve 5 NOP instructions in the program as placeholders for function jumps. The larch_insn_text_copy() function is solely used for BPF. And the use of larch_insn_text_copy() requires PAGE_SIZE alignment. Currently, only the size of the BPF trampoline is page-aligned. Co-developed-by: George Guo <[email protected]> Signed-off-by: George Guo <[email protected]> Signed-off-by: Chenghao Duan <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c')
0 files changed, 0 insertions, 0 deletions