Function framebuffer::framebuffer

source ยท
pub fn framebuffer(
    vram: Mappable,
    len: usize,
    offset: u64,
) -> Result<(Framebuffer, FramebufferAccess)>
Expand description

Creates a framebuffer and an object that can be used to read from it. The framebuffer should be allocated prior to calling this function.

  • vram: Mappable (OwnedFd/OwnedHandle) that can be mapped into guest memory and a SparseMapping for the VNC server to read from. In HvLite, this is created by alloc_shared_memory. In Underhill, this is /dev/mshv_vtl_low.

  • len: The amount of memory that was allocated for the framebuffer.

  • offset: The file_offset that should be used when reading the framebuffer. In HvLite, this should be 0. In Underhill, this is the GPA of the VTL2 framebuffer mapping.