rproc_handle_vdev(9)
π¦ rproc_handle_vdev(9) π¦
Bestie, welcome to the Kernel API Manual page for rproc_handle_vdev β the remote processor corner of the kernel is lowkey iconic, and this function is here to handle a vdev fw resource β¨
β¨ NAME β¨
rproc_handle_vdev β handle a vdev fw resource.
π₯ SYNOPSIS π₯
int rproc_handle_vdev (struct rproc *rproc , void *ptr , int offset ,
int avail );
π«Ά ARGUMENTS π«Ά
rprocβ the remote processor πptrβ the vring resource descriptoroffsetβ offset of the resource entryavailβ size of available data (for sanity checking the image)
π DESCRIPTION π
No cap, this resource entry is the host's official request to statically register a virtio device (vdev) and set up literally everything needed to support it. It's carrying the whole starter pack: the virtio device id, virtio device features, vrings information, virtio config space, etc... π
Before the vdev gets registered, the vrings are allocated from non-cacheable physically contiguous memory. Currently we only support two vrings per remote processor (temporary limitation) β periodt. We might also want to consider doing the vring allocation only later when ->find_vqs is invoked, and then release them upon ->del_vqs. That's the dream, anyway π
π NOTE π
Vibe check: da is currently not really handled correctly π β we dynamically allocate it using the DMA API, ignoring requested hard coded addresses, and we don't take care of any required IOMMU programming. This is all going to be taken care of when the generic iommu-based DMA API will be merged.
Meanwhile, statically-addressed iommu-based firmware images should use RSC_DEVMEM resource entries to map their required da to the physical address of their base CMA region (ouch, hacky!). Fr fr, that parenthetical is doing a lot of emotional work π
π RETURN π
0 on success, or an appropriate error code otherwise.
π SEE ALSO π
Kernel file ./drivers/remoteproc/remoteproc_core.c β plus the whole (9) bestie squad: rproc_da_to_va(9), rproc_find_carveout_by_name(9), rproc_check_carveout_da(9), rproc_handle_trace(9), rproc_handle_devmem(9), rproc_alloc_carveout(9), rproc_release_carveout(9), rproc_handle_carveout(9), rproc_add_carveout(9), rproc_mem_entry_init(9), rproc_of_resm_mem_entry_init(9), rproc_of_parse_firmware(9), rproc_alloc_registered_carveouts(9), rproc_resource_cleanup(9), rproc_trigger_recovery(9), rproc_crash_handler_work(9), rproc_boot(9), rproc_shutdown(9), rproc_detach(9), rproc_get_by_phandle(9), rproc_set_firmware(9), rproc_add(9), devm_rproc_add(9), rproc_type_release(9), rproc_alloc(9), rproc_free(9), rproc_put(9), rproc_del(9), devm_rproc_alloc(9), rproc_add_subdev(9), rproc_remove_subdev(9), rproc_get_by_child(9), rproc_report_crash(9).
Catch you in the kernel, bestie π β source/version: ./drivers/remoteproc Β· date: October 2026 Β· manual: Kernel API Manual β¨
π¦ 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