STRUCT CXL_RD_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct cxl_rd_ops(9) β€” like, the CXL root decoder callback ops bestie ✨

Okay so welcome to the Kernel API Manual page for struct cxl_rd_ops β€” this is the little struct that holds the callbacks a CXL root decoder uses, and honestly? It's giving "small but mighty" πŸŽ€

🌸 NAME 🌸

struct cxl_rd_ops β€” CXL root decoder callback operations. That's it, that's the whole vibe. It's the ops struct, it's iconic, it does exactly what it says on the tin πŸ’–

✨ SYNOPSIS ✨

Here's the whole thing, literally copy-pasted energy but make it correct β€” two function pointers, no cap:

struct cxl_rd_ops {
    u64 (*hpa_to_spa)(struct cxl_root_decoder *cxlrd, u64 hpa);
    u64 (*spa_to_hpa)(struct cxl_root_decoder *cxlrd, u64 spa);
 };

πŸ¦‹ Members πŸ¦‹

Two members, both baddies, both doing address translation for you 🫢

  • hpa_to_spa β€” converts a host physical address into a system physical address. Basically it takes your hpa and tells you what spa it maps to, and it takes a struct cxl_root_decoder *cxlrd plus a u64 hpa to do it πŸ”₯
  • spa_to_hpa β€” the ✨reverse✨ direction: converts a system physical address into a host physical address. Same deal, it's handed a struct cxl_root_decoder *cxlrd and a u64 spa and gives you back the host-side answer πŸ’«
Lowkey the whole point of this struct is that the root decoder doesn't hardcode how translation works β€” it just gets these two callbacks and lets them handle it. Main character energy for a function pointer table, fr fr πŸ‘‘

🌈 SEE ALSO 🌈

Go read the kernel file ./drivers/cxl/cxl.h first, iykyk, and then go hang out with all the other cxl objects(9) besties β€” they're all linked together and honestly it's a whole friend group πŸ’œ

  • cxl objects(9)
  • struct cxl_decoder(9)
  • struct cxl_endpoint_decoder(9)
  • struct cxl_switch_decoder(9)
  • struct cxl_root_decoder(9)
  • struct cxl_region_params(9)
  • struct cxl_region(9)
  • struct cxl_port(9)
  • struct cxl_root(9)
  • struct cxl_dport(9)
  • struct cxl_ep(9)
  • struct cxl_region_ref(9)
  • struct cxl_endpoint_dvsec_info(9)

Okay that's the whole page bestie, go forth and translate those addresses πŸ’…βœ¨ This one lives in ./drivers/cxl, it's dated October 2026, and yes β€” it's still struct cxl_rd_ops(9), slay πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from