CLI argv -> VirtMachineParams -> RISCVMachine / PC machine -> PhysMemoryMap ranges -> CPU interpreter -> target_* memory helpers -> device read/write callbacks -> VirtIO queue callbacks -> host block/net/fs/console/display/input
End-to-end pipelineThe main data structures and callbacks that connect host resources to the guest.
Layer responsibilitiesEach layer owns one translation in the flow.
Startup Config to parameters
`virt_machine_parse_config()` turns JSON keys into typed fields. `config_additional_file_load()` then loads BIOS, kernel, initrd, and VGA BIOS blobs before device construction.
Machine Parameters to topology
`riscv_machine_init()` allocates the CPU, maps RAM, installs CLINT/PLIC/HTIF MMIO callbacks, creates VirtIO devices, and copies boot payloads into RAM.
CPU Virtual to physical
`get_phys_addr()` performs privilege and page-table translation. Slow read/write paths populate TLB entries for RAM and call device callbacks for MMIO.
VirtIO Descriptors to host work
Guest drivers write queue addresses and notify registers. `queue_notify()` walks available descriptors, calls the device handler, then `virtio_consume_desc()` writes used-ring entries and raises an IRQ.