STRUCT ACRN_VDEV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct acrn_vdev (9) β€” the Kernel API Manual, bestie edition

okay so you're here for struct acrn_vdev, and honestly? it's giving "backstage pass to the hypervisor." this is a Kernel API Manual page, so grab a snack and let's get into it πŸ“


✨ NAME ✨

struct acrn_vdev β€” literally just the info you need for creating or destroying a virtual device. that's the whole vibe. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the struct, copy-pasted exactly because i would never mess with your code:

struct acrn_vdev {
    union {
      __u64 value;
      struct {
        __le16 vendor;
        __le16 device;
        __le32 legacy_id;
      } fields;
    } id;
    __u64 slot;
    __u32 io_addr[ACRN_PCI_NUM_BARS];
    __u32 io_size[ACRN_PCI_NUM_BARS];
    __u8 args[128];
 };

no cap, she's compact. let's break down every single member πŸ‘‡


🌸 Members 🌸

  • id β€” a union holding the identifier of the virtual device. it's the "who dis" field πŸ’…
  • id.value β€” the raw data of the identifier. just the bits, unfiltered.
  • id.fields.vendor β€” vendor id of the virtual PCI device 🏷️
  • id.fields.device β€” device id of the virtual PCI device ✨
  • id.fields.legacy_id β€” the ID of the virtual device if it's not a PCI device. legacy icon behavior 🧚
  • slot β€” virtual Bus/Device/Function of the virtual device. that's BDF, iykyk.
  • io_size β€” IO resource size of the virtual device. how much room she needs πŸ“
  • args β€” arguments for the virtual device creation. the little 128-byte goodie bag of creation params 🎁
side note: you'll also clock io_addr[ACRN_PCI_NUM_BARS] sitting right there in the struct β€” the page doesn't say anything about it, so neither will i. no invented lore on my watch πŸ™ˆ

πŸ”₯ Description πŸ”₯

okay so the whole point: the created virtual device can be a PCI device or a legacy device (like, say, a virtual UART controller), and it's emulated by the hypervisor. main character energy, the hypervisor does all the work πŸ’…

this structure gets passed to the hypervisor directly. no middleman, no filter, fr fr. so treat what you put in there with the respect it deserves πŸ‘‘


🌈 SEE ALSO 🌈

go touch some other structs, bestie:

  • Kernel file ./include/uapi/linux/acrn.h β€” that's where these live 🫢
  • struct acrn_mmio_request(9)
  • struct acrn_pio_request(9)
  • struct acrn_pci_request(9)
  • struct acrn_io_request(9)
  • struct acrn_ioreq_notify(9)
  • struct acrn_vm_creation(9)
  • struct acrn_gp_regs(9)
  • struct acrn_descriptor_ptr(9)
  • struct acrn_regs(9)
  • struct acrn_vcpu_regs(9)
  • struct acrn_vm_memmap(9)
  • struct acrn_ptdev_irq(9)
  • struct acrn_pcidev(9)
  • struct acrn_mmio_dev_res(9)
  • struct acrn_mmiodev(9)
  • struct acrn_msi_entry(9)
  • struct acrn_cstate_data(9)
  • struct acrn_pstate_data(9)
  • struct acrn_ioeventfd(9)
  • struct acrn_irqfd(9)

like, the entire acrn friend group. go say hi πŸ’–


and that's the page, bestie πŸŽ€ she lives in ./include/uapi/linux, dated October 2026 β€” that's the source and the date, so you can cite me. stay hydrated, keep your structs aligned, and slay your ioctls βœ¨πŸ’…

πŸ“¦ where this page comes from