STRUCT ACRN_REGS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct acrn_regs(9) πŸ’–

okay so bestie, welcome to the glow-up doc for struct acrn_regs β€” the registers structure of a User VM ✨ (this is the Kernel API Manual babe, we're in the big leagues now πŸ‘‘)


✨ NAME ✨

struct acrn_regs β€” the registers structure of a User VM πŸ–₯οΈπŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

struct acrn_regs {
    struct acrn_gp_regs             gprs;
    struct acrn_descriptor_ptr      gdt;
    struct acrn_descriptor_ptr      idt;
    __le64 rip;
    __le64 cs_base;
    __le64 cr0;
    __le64 cr4;
    __le64 cr3;
    __le64 ia32_efer;
    __le64 rflags;
    __le64 reserved_64[4];
    __le32 cs_ar;
    __le32 cs_limit;
    __le32 reserved_32[3];
    __le16 cs_sel;
    __le16 ss_sel;
    __le16 ds_sel;
    __le16 es_sel;
    __le16 fs_sel;
    __le16 gs_sel;
    __le16 ldt_sel;
    __le16 tr_sel;
 };

ngl that's a lot of fields and every single one of them is iconic in its own way 🫢 let's go through them one by one, no skipping, we don't do that here πŸ“


🌸 Members 🌸

  • gprs β€” the general registers, your everyday faves πŸ’«
  • gdt β€” the Global Descriptor Table, main character energy fr fr
  • idt β€” the Interrupt Descriptor Table, she interrupts (respectfully) 😭
  • rip β€” value of register RIP, the "where are we even going" register
  • cs_base β€” base of the code segment selector 🧭
  • cr0 β€” value of register CR0
  • cr4 β€” value of register CR4
  • cr3 β€” value of register CR3, the control-register girlies are all here πŸ’…
  • ia32_efer β€” value of the IA32_EFER MSR ✨
  • rflags β€” value of register RFLAGS (yes that one, she's got flags 🚩)
  • reserved_64 β€” reserved and must be 0 ⚠️ like, do not touch, this is not your moment
  • cs_ar β€” attribute field of the code segment selector
  • cs_limit β€” limit field of the code segment selector
  • reserved_32 β€” reserved and must be 0 ⚠️ same deal bestie, hands off
  • cs_sel β€” value of the code segment selector
  • ss_sel β€” value of the stack segment selector πŸ“š
  • ds_sel β€” value of the data segment selector
  • es_sel β€” value of the extra segment selector
  • fs_sel β€” value of the FS selector
  • gs_sel β€” value of the GS selector
  • ldt_sel β€” value of the LDT descriptor selector
  • tr_sel β€” value of the TSS descriptor selector 🧚
lowkey important: reserved_64 and reserved_32 are reserved and must be 0 β€” that's not a vibe suggestion, that's the rule 😀✨

πŸ¦‹ SEE ALSO πŸ¦‹

the kernel file is ./include/uapi/linux/acrn.h and honestly the whole friend group is here, go say hi πŸ’–

  • 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_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_vdev(9)
  • struct acrn_msi_entry(9)
  • struct acrn_cstate_data(9)
  • struct acrn_pstate_data(9)
  • struct acrn_ioeventfd(9)
  • struct acrn_irqfd(9)

and that's the whole page bestie, you ate that πŸ’…βœ¨

this cutie lives in ./include/uapi/linux and the version/date stamp on her is October 2026 β€” so yeah, she's from the future, we stan a forward-thinking icon πŸ•°οΈπŸ‘‘ mwah, go read the kernel source πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from