genwqe_is_privileged(9)
π genwqe_is_privileged β a Kernel API Manual moment
okay so bestie, welcome to the Kernel API Manual page for genwqe_is_privileged(9), and honestly? it's giving "tiny function, whole lore" β¨ buckle up π
πΈ NAME πΈ
genwqe_is_privileged β figure out which operation mode a PCI function is running in π
β¨ SYNOPSIS β¨
int genwqe_is_privileged (struct genwqe_dev *cd );
π¦ ARGUMENTS π¦
cdβ no cap, the original page literally leaves this one as-- undescribed --π so that's all we have, bestie. astruct genwqe_dev *, and the manpage does not describe it further. π
π DESCRIPTION π
okay so here's the whole vibe. GenWQE has one single PCI device id for both VFs and PFs, and that is lowkey a problem, because every other vendor gets to tell virtual function drivers and physical function drivers apart with their own individual pci device ids. GenWQE? just the one. for both. π«
so we distinguish modes other ways, and here's what we actually see in the wild π₯
On Intel with SRIOV support, it looks like this:
- PF:
is_physfn = 1is_virtfn = 0 - VF:
is_physfn = 0is_virtfn = 1
On systems with no SRIOV support _and_ virtualized systems, it's this instead:
is_physfn = 0is_virtfn = 0
and then there's this little snippet, which is what the function actually uses to tell whether the card is running in privileged mode β either as a true PF, or in a virtualized system with full register access (e.g. currently on PowerPC π§):
if (pci_dev->is_virtfn) cd->is_privileged = 0; else cd->is_privileged =
(__genwqe_readq(cd, IO_SLU_BITSTREAM) != IO_ILLEGAL_VALUE);
periodt. that's the whole decision tree, and it's iconic honestly π
π₯ SEE ALSO π₯
go read these next, bestie, they're all connected iykyk π
- Kernel file
./drivers/misc/genwqe/card_base.h struct genwqe_reg(9)struct dma_mapping(9)struct ddcb_queue(9)struct genwqe_dev(9)enum genwqe_requ_state(9)struct genwqe_sgl(9)struct ddcb_requ(9)struct genwqe_file(9)genwqe_get_slu_id(9)genwqe_write_vreg(9)genwqe_read_vreg(9)__genwqe_execute_ddcb(9)__genwqe_execute_raw_ddcb(9)
π and that's a wrap, bestie!! this little page lives in ./drivers/misc/genwqe, it's dated October 2026, and it's chillin' under the genwqe_is_privileged(9) name in the Kernel API Manual. go be privileged (or not, depending on is_virtfn π) β mwah π«Άπ
π¦ 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