Closed jiangliu closed 4 years ago
No objection from me. However from_regions
and from_arc_regions
could be changed into implementation of the From<>
trait instead of being associated functions.
No objection from me. However
from_regions
andfrom_arc_regions
could be changed into implementation of theFrom<>
trait instead of being associated functions.
The from_arc_regions() has some sanity-check logics, so can't be convert to From trait.
With code evolves, now we have several constructors for GuestMemoryMmap:
With these four constructors, we still have no constructors to create an empty GuestMemoryMmap instance. All these constructors assume that memory regions are static and created at boot time. And memory hotplug breaks this assumption.
So how about refining the constructors as:
Note, these changes may break existing code in CrosVM, firecracker and cloud hypervisor projects.