acrn-hypervisor/hypervisor/include
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
..
arch/x86/asm hv: vm_event: create vm_event support 2024-02-01 17:01:31 +08:00
common hv: add max_len for sbuf_put param 2024-02-20 11:52:02 +08:00
debug hv: change sbuf to a common infrastructure 2022-09-27 10:26:42 +08:00
dm HV: emulate dummy multi-function dev in Service VM 2023-09-11 16:13:16 +08:00
hw ACRN:HV:VPCI: Forward access of PCI ROM bar_reg to DM for passthru device 2022-09-23 18:12:01 +08:00
lib hv: add clamp macro for convenience 2023-09-18 16:26:05 +08:00
public dm: vm_event: add support for RTC change event 2024-02-01 17:01:31 +08:00