vm_mmap_memseg() returns success without mapping anything when a
mapping with the same segment, offset, protection and flags already
starts at the requested address, but it does not compare the length.
A longer request then reports success for pages it did not map, and a
shorter one for a mapping that vm_munmap_memseg() cannot remove with
the same range. No caller in the tree makes such a request.
Fail with EEXIST when the length differs, as for the other attributes,
and document that behavior. Read the existing mapping into its own
structure rather than over the arguments.
Fixes: 9b1aa8d622e8 ("Restructure memory allocation in bhyve to support "devmem".")
Sponsored by: Alchemilla Ventures Private Limited