mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Reimplement run_unaligned_operation over AlignedFile read_vectored_at and write_vectored_at instead of scattering and gathering through the per operation write_bytes_at and read_bytes_at closures. The aio and uring engines already reach this helper for the O_DIRECT misaligned case, so both now share the same vectored bounce path as the sync engine and the scatter gather logic lives only in AlignedFile. The operation iovecs point at the same memory that write_bytes_at and read_bytes_at reach, and the aligned fast path already hands those iovecs to the kernel, so the direct vectored call is equivalent. For guest memory read targets the destination pages are marked dirty by mark_read_dirty in execute_async before the operation is submitted, independent of how the bounce copies bytes, so the raw iovec path preserves dirty tracking. Drop the now unneeded mut bindings at the call sites. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>