STRUCT VIORTC_DEV(9)
π struct viortc_dev(9) β the kernel API manual, bestie edition π
okay so this is the man page for struct viortc_dev(9) from the Kernel API Manual, and it's literally the glow-up era of virtio_rtc device data. it's giving "i hold everything together" energy. let's get into it π«Ά
β¨ NAME β¨
struct viortc_dev β the virtio_rtc device data struct. that's it, that's the vibe. it's the main character that carries all the device info π
πΈ SYNOPSIS πΈ
struct viortc_dev {
struct virtio_device *vdev;
struct viortc_class *viortc_class;
struct viortc_vq vqs[VIORTC_MAX_NR_QUEUES];
struct viortc_ptp_clock **clocks_to_unregister;
void **alarmq_bufs;
unsigned int num_alarmq_bufs;
u16 num_clocks;
};
like, look at those fields. no notes. iconic. π
π Members π
vdevβ the virtio device itself. the whole reason we're here, fr fr.viortc_classβ the RTC class wrapper for the UTC-like clock. it'sNULLif that clock isn't available, so don't come for it if it's not there πvqsβ the virtqueues. plural. we contain multitudes π¦clocks_to_unregisterβ clock references that are only used during device removal. like, this is a very specific-purpose field, bestie, and there's a real reason for that: for any other use there would be a race between device creation and setting the pointers here. so yeah, don't try it, that's a π situation, ngl.alarmq_bufsβ the alarmq buffers list. the name is basically the whole job πnum_alarmq_bufsβ#of alarmq buffers. keeping count. someone has to π§num_clocksβ#of virtio_rtc clocks. also keeping count. also someone has to β¨
π₯ SEE ALSO π₯
the kernel file ./drivers/virtio/virtio_rtc_driver.c, plus literally the whole extended universe of structs and functions β go study, it's a whole syllabus π€
struct viortc_vq(9)struct viortc_msg(9)viortc_class_from_dev(9)viortc_alarms_supported(9)viortc_feed_vq(9)viortc_msg_init(9)viortc_msg_release(9)viortc_do_cb(9)viortc_requestq_hdlr(9)viortc_cb_requestq(9)viortc_alarmq_hdlr(9)viortc_cb_alarmq(9)viortc_get_resp_errno(9)viortc_msg_xfer(9)VIORTC_DECLARE_MSG_HDL_ONSTACK(9)VIORTC_MSG(9)VIORTC_MSG_INIT(9)VIORTC_MSG_WRITE(9)VIORTC_MSG_READ(9)viortc_read(9)viortc_read_cross(9)viortc_cfg(9)viortc_clock_cap(9)viortc_cross_cap(9)viortc_read_alarm(9)viortc_set_alarm(9)viortc_set_alarm_enabled(9)viortc_init_rtc_class_clock(9)viortc_init_ptp_clock(9)viortc_init_clock(9)viortc_clocks_deinit(9)viortc_clocks_init(9)viortc_populate_vq(9)viortc_alloc_vq_bufs(9)viortc_init_vqs(9)viortc_probe(9)viortc_remove(9)
and that's the page, bestie π this one came out of ./drivers/virtio and it's dated October 2026 β bookmark it, screenshot it, send it to the group chat, whatever you gotta do πβ
π¦ 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