acrn-hypervisor/hypervisor/dm
Wu Zhou 925e3d95b4 hv: add max_len for sbuf_put param
sbuf_put copies sbuf->ele_size of data, and puts into ring. Currently
this function assumes that data size from caller is no less than
sbuf->ele_size.

But as sbuf->ele_size is usually setup by some sources outside of the HV
(e.g., the service VM), it is not meant to be trusted. So caller should
provide the max length of the data for safety reason. sbuf_put() will
return UINT32_MAX if max_len of data is less than element size.

Additionally, a helper function sbuf_put_many() is added for putting
multiple entries.

Tracked-On: #8547
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2024-02-20 11:52:02 +08:00
..
vpci hv: support multi function ivshmem device 2023-09-27 16:46:20 +08:00
io_req.c hv: add max_len for sbuf_put param 2024-02-20 11:52:02 +08:00
mmio_dev.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
vgpio.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
vioapic.c doc: remove '@return None' for void functions 2023-08-03 14:56:29 -07:00
vpic.c doc: remove '@return None' for void functions 2023-08-03 14:56:29 -07:00
vrtc.c hv: vm_event: send RTC change event in hv vRTC 2024-02-01 17:01:31 +08:00
vuart.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00