STRUCT GENWQE_DEV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

struct genwqe_dev β€” GenWQE device information

okay so this is the kernel API manual page for it, bestie, and it's genuinely the whole vibe of "everything you need to know about one GenWQE card, in one struct." Let's get into it ✨


✨ SYNOPSIS ✨

struct genwqe_dev {
    enum genwqe_card_state card_state;
    spinlock_t print_lock;
    int card_idx;
    u64 flags;
    struct genwqe_ffdc ffdc[GENWQE_DBG_UNITS];
    struct task_struct *card_thread;
    wait_queue_head_t queue_waitq;
    struct ddcb_queue queue;
    unsigned int irqs_processed;
    struct task_struct *health_thread;
    wait_queue_head_t health_waitq;
    int use_platform_recovery;
    dev_t devnum_genwqe;
    const struct class *class_genwqe;
    struct device *dev;
    struct cdev cdev_genwqe;
    struct dentry *debugfs_root;
    struct dentry *debugfs_genwqe;
    struct pci_dev *pci_dev;
    void __iomem *mmio;
    unsigned long mmio_len;
    int num_vfs;
    u32 vf_jobtimeout_msec[GENWQE_MAX_VFS];
    int is_privileged;
    u64 slu_unitcfg;
    u64 app_unitcfg;
    u64 softreset;
    u64 err_inject;
    u64 last_gfir;
    char app_name[5];
    spinlock_t file_lock;
    struct list_head file_list;
    int ddcb_software_timeout;
    int skip_recovery;
    int kill_timeout;
 };

like, look at her. so many fields. she's built πŸ’…


🌸 Members 🌸

not every field gets a lil blurb down here, and that's fine β€” but the ones that do? iconic. here's the breakdown πŸŽ€

  • card_state β€” card operation state, see above πŸ‘€
  • ffdc β€” First Failure Data Capture buffers, one for each unit πŸ”₯
  • card_thread β€” the working thread that operates the DDCB queue
  • queue β€” the DDCB queue itself
  • health_thread β€” the card monitoring thread (only for PFs, fyi)
  • health_waitq β€” the wait queue used in health_thread
  • pci_dev β€” the associated PCI device (function)
  • mmio β€” base address of the 64-bit register space
  • mmio_len β€” length of the register area
  • file_lock β€” the lock that protects access to file_list
  • file_list β€” list of every process with open GenWQE file descriptors πŸ—‚οΈ

πŸ¦‹ Description πŸ¦‹

so this struct is lowkey the main character of the whole show πŸ’œ It contains all the information you need to communicate with a GenWQE card. It gets initialized when a GenWQE device is found, and destroyed when it goes away β€” birth and death of a card, no cap.

she holds the data to maintain the queue, plus the data needed to feed the user interfaces. so basically: the queue-keeper AND the people-feeder. multi-hyphenate queen πŸ‘‘


πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file ./drivers/misc/genwqe/card_base.h, and also these besties who are always in the group chat:


ngl bestie, if you got here you probably actually need to talk to a GenWQE card, and that's so valid of you 🫢 go read the other pages too, they're all linked above πŸ’–

okay that's the whole page!! she came from ./drivers/misc/genwqe, dated October 2026 β€” stamped and certified, periodt βœ¨πŸŽ€πŸ’…

πŸ“¦ where this page comes from