acrn-hypervisor/hypervisor/include/common
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
..
delay.h doc: remove '@return None' for void functions 2023-08-03 14:56:29 -07:00
efi_mmap.h
event.h hv: Change sched_event back to boolean-based implementation 2022-07-14 09:05:37 +08:00
hypercall.h hv: add hypercall to register asyncio 2022-09-27 10:26:42 +08:00
irq.h Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
ptdev.h Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
sbuf.h hv: add max_len for sbuf_put param 2024-02-20 11:52:02 +08:00
schedule.h config: add four per-vm bvt parameters 2023-09-18 16:26:05 +08:00
softirq.h Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
ticks.h
timer.h doc: remove '@return None' for void functions 2023-08-03 14:56:29 -07:00
vm_event.h hv: vm_event: create vm_event support 2024-02-01 17:01:31 +08:00