STRUCT FH_SG_LIST(9)
π struct fh_sg_list(9) π
okay bestie, welcome to the Kernel API Manual entry for struct fh_sg_list β this is the whole entire definition of the fh_partition_memcpy S/G list, and honestly? it's giving "small struct, big responsibilities" π
β¨ NAME β¨
struct fh_sg_list β the definition of the fh_partition_memcpy S/G list. that's it, that's the name, no cap π«Ά
πΈ SYNOPSIS πΈ
struct fh_sg_list {
uint64_t source;
uint64_t target;
uint64_t size;
uint64_t reserved;
};
look at her. four fields. immaculate. no notes. β
π¦ Members π¦
sourceβ the guest physical address you're copying from πtargetβ the guest physical address you're copying to β¨sizeβ how many bytes we're copying, literally the number of bytes πreservedβ reserved, and it must be zero. like, do not touch, do not pass go, zero only π
π Description π
so the scatter/gather list for fh_partition_memcpy is an array of these structures. yes, an array β one is cute, many is the whole point π
that array must be guest physically contiguous. not "kinda close together", not "adjacent-ish" β contiguous. the vibe check here is strict π₯
also: this structure must be aligned on a 32-byte boundary, and the reason is honestly so smart β that way no single structure can span two pages. periodt. π
π SEE ALSO π
kernel file ./arch/powerpc/include/asm/fsl_hcalls.h β and the whole friend group:
fh_send_nmi(9)fh_partition_get_dtprop(9)fh_partition_restart(9)fh_partition_get_status(9)fh_partition_start(9)fh_partition_stop(9)fh_partition_memcpy(9)fh_dma_enable(9)fh_dma_disable(9)fh_vmpic_get_msir(9)fh_system_reset(9)fh_err_get_info(9)fh_get_core_state(9)fh_enter_nap(9)fh_exit_nap(9)fh_claim_device(9)
ngl bestie, remember the two rules: contiguous array, 32-byte aligned struct, andreservedstays0. that's the whole assignment π
mwah, that's a wrap! π§ this page lives in ./arch/powerpc/include/asm, dated October 2026, and it's filed under struct fh_sg_list(9) β ily, go read the other hcalls now ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms