hvcs_get_partner_info(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… hvcs_get_partner_info (from the Kernel API Manual, bestie)

Okay so picture this: you're deep in the hvcs world and you need all the partner info for a vty-server adapter. That's literally this function. It's giving "collect the whole squad's info from the hypervisor" energy and honestly? Iconic. 🫢


✨ SYNOPSIS ✨

int hvcs_get_partner_info (uint32_t unit_address , struct list_head
*head , unsigned long *pi_buff );

πŸŽ€ ARGUMENTS πŸŽ€

  • unit_address β€” the unit_address of the vty-server adapter that we're fetching partner info for. Like, which adapter's partners are we talking about? This one. πŸ‘‘
  • head β€” an initialized list_head pointer pointing at an empty list. This is the container you hand over so the function can drop the list of partner info it fetched from the hypervisor back to you, the caller. Empty on the way in, full of partner info on the way out. Slay. ✨
  • pi_buff β€” a page-sized buffer that you pre-allocate before calling this function. Firmware uses it as an iterator to keep track of the partner info retrieval. Heads up: the original text says "to be used to be used by firmware" β€” yes, the double "to be used" is fr in there, we don't fix, we report. πŸ’€

🌸 DESCRIPTION 🌸

So this function returns non-zero on success β€” or if there's no partner info at all. That's the vibe check: non-zero = we're good, one way or another. πŸ¦‹

Now, about pi_buff β€” the reason you gotta pre-allocate it before calling is super important, bestie: this function may be called with a spin_lock held, and kmallocing a page is not recommended as GFP_ATOMIC. So no sneaky allocating inside. Do it first. Periodt. πŸ’…

Here's the layout of that buffer, and it's kinda unhinged but we roll with it:

  • The first long stores a partner unit address.
  • The second long stores a partner partition ID.
  • Starting at pi_buff[2] you get the 79 character Converged Location Code β€” which is a different size than the unsigned longs, hence the casting mumbo jumbo you see later. Not me explaining the casting mumbo jumbo 😭 but like, that's genuinely what the docs say.
⚠️ Big one, don't skip: invocation of this function should always be followed by an invocation of hvcs_free_partner_info, using a pointer to the SAME list_head instance that you passed as a parameter to this function. Same instance. Not a lookalike. Not a cousin. The same one. fr fr. πŸ”₯

πŸ‘€ SEE ALSO πŸ‘€


That's the whole page, bestie β€” no cap, every last detail preserved. πŸ’– This lil' slice of the Kernel API Manual lives at ./arch/powerpc/platforms/pseries and it's dated October 2026, so mark your calendars and go free those partner info lists. 🧚⭐ πŸŽ€

πŸ“¦ where this page comes from