HV: add find_space_from_ve820() api

The API would search ve820 table and return a valid GPA when the requested
size of memory is available in the specified memory range, or return
INVALID_GPA if the requested memory slot is not available;

Tracked-On: #5626

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
Victor Sun
2021-05-14 14:43:15 +08:00
committed by wenlingz
parent 6127c0c5d2
commit ed97022646
2 changed files with 53 additions and 0 deletions

View File

@@ -248,6 +248,7 @@ struct acrn_vm *get_sos_vm(void);
void create_sos_vm_e820(struct acrn_vm *vm);
void create_prelaunched_vm_e820(struct acrn_vm *vm);
uint64_t find_space_from_ve820(struct acrn_vm *vm, uint32_t size, uint64_t min_addr, uint64_t max_addr);
int32_t vm_sw_loader(struct acrn_vm *vm);