In some cases it is not sufficient to obtain the maximum physical address and add a new gfn behind it. There might be MMIO or other chunks of memory that are excluded in kvm_get_max_gfn allocated behind that address in which case the allocation may fail. This API is guaranteed to return a gfn that is not occupied.
In some cases it is not sufficient to obtain the maximum physical address and add a new gfn behind it. There might be MMIO or other chunks of memory that are excluded in
kvm_get_max_gfn
allocated behind that address in which case the allocation may fail. This API is guaranteed to return a gfn that is not occupied.