ccwchain_calc_length(9)
π ccwchain_calc_length(9) β the kernel API manual, bestie edition
okay so this is a page from the Kernel API Manual, section 9, and it's about ccwchain_calc_length β say that five times fast, i literally can't π anyway it's lowkey a little function with big main character energy and we're gonna get into it.
β¨ NAME β¨
ccwchain_calc_length β calculate the length of the ccw chain. that's it. that's the whole job. she does one thing and she does it well π
π SYNOPSIS π
int ccwchain_calc_length (u64 iova , struct channel_program *cp );
π¦ ARGUMENTS π¦
iovaβ the guest physical address of the target ccw chain. like, which chain are we measuring, bestie? this is how you tell her π«Άcpβ thechannel_programon which to perform the operation. this is the poor little program getting the treatment.
πΈ DESCRIPTION πΈ
so here's the vibe: this gives you the chain length, and it is not considering any TICs. none. zero. not even a little. π
meaning? you've gotta do a whole new round for each TIC target. yes, each one. one round per target. it's giving "loop it yourself, queen." π₯
and there's a lil bonus job on the side: the program also gets validated for the absence of any not-yet-supported indirect data addressing scenarios. so it's checking that you're not trying to pull anything the kernel doesn't support yet β no cap, it will notice π
β RETURN β
the length of the ccw chain β or -errno, if things went sideways π
π SEE ALSO π
- Kernel file
./drivers/s390/cio/vfio_ccw_cp.c cp_init(9)cp_free(9)cp_prefetch(9)cp_get_orb(9)cp_update_scsw(9)cp_iova_pinned(9)
like, go read the whole friend group, they literally all hang out in the same file π§
fr fr: keep the TIC thing in mind or your chain length is gonna be lying to you π
okay that's the page!! this icon was living in ./drivers/s390/cio, stamped October 2026, and she ate. periodt. ππβ¨
π¦ 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