ENUM VIRTIO_PCIDEV_OPS(9)
πΈ enum virtio_pcidev_ops(9) β bestie's guide to the virtual PCI device ops π
Okay so this is the <pink>enum virtio_pcidev_ops</pink> page from the Kernel API Manual, and honestly? It's giving "the entire vocabulary a virtual PCI device can speak." Every message type it can send or receive lives here. Let's get into it. β¨
β¨ SYNOPSIS β¨
enum virtio_pcidev_ops {
VIRTIO_PCIDEV_OP_RESERVED ,
VIRTIO_PCIDEV_OP_CFG_READ ,
VIRTIO_PCIDEV_OP_CFG_WRITE ,
VIRTIO_PCIDEV_OP_MMIO_READ ,
VIRTIO_PCIDEV_OP_MMIO_WRITE ,
VIRTIO_PCIDEV_OP_MMIO_MEMSET ,
VIRTIO_PCIDEV_OP_INT ,
VIRTIO_PCIDEV_OP_MSI ,
VIRTIO_PCIDEV_OP_PME
};
π Constants β the whole squad π
So these are all the possible ops, and each one is a different vibe of message. Here we go, no cap:
VIRTIO_PCIDEV_OP_RESERVEDβ literally just sitting there to catch errors. It's the designated driver of this enum. πVIRTIO_PCIDEV_OP_CFG_READβ read config space. Thesizeis1,2,4or8, and thedatafield should be filled in by the device, in little endian.VIRTIO_PCIDEV_OP_CFG_WRITEβ write config space. Samesizesituation:1,2,4or8. Thedatafield contains the data to write, in little endian.VIRTIO_PCIDEV_OP_MMIO_READβ read BAR mem/pio.sizecan be variable here (not just the config-space sizes, watch out π). Thedatafield should be filled in by the device, in little endian.VIRTIO_PCIDEV_OP_MMIO_WRITEβ write BAR mem/pio.sizecan be variable. Thedatafield contains the data to write, in little endian.VIRTIO_PCIDEV_OP_MMIO_MEMSETβ memset MMIO.sizeis variable, BUT thedatafield only has one byte β unlikeVIRTIO_PCIDEV_OP_MMIO_WRITE. Don't mix them up bestie, they are NOT the same. πVIRTIO_PCIDEV_OP_INTβ legacy INTx# pin interrupt. Theaddrfield is1-4for the number. Old-school but iconic.VIRTIO_PCIDEV_OP_MSIβ MSI(-X) interrupt. This message basically transports the16- or32-bit write that would otherwise be done into memory β analogous to the write messages (VIRTIO_PCIDEV_OP_MMIO_WRITE) above. iykyk π₯VIRTIO_PCIDEV_OP_PMEβ a dummy message whose content is ignored (and should be all zeroes) to signal thePME#pin. It's literally just there to say "hey, PME# happened" and nothing else. π«Ά
π SEE ALSO π
- Kernel file
./include/uapi/linux/virtio_pcidev.h - struct
virtio_pcidev_msg(9)
And that's the page, bestie! π¦ This gem lives at ./include/uapi/linux and the date on it is October 2026. Go forth and speak fluent virtio PCI device ops β 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