mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-24 06:29:19 +00:00
HV: Extend non-contiguous HPA for hybrid scenario
This patch extends non-contiguous HPA allocations for pre-launched VMs in hybrid scenario. Tracked-On: #4217 Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
b32ae229fb
commit
c8a4ca6c78
@ -321,6 +321,13 @@ static void create_sos_vm_e820(struct acrn_vm *vm)
|
||||
filter_mem_from_sos_e820(vm, vm_config->memory.start_hpa,
|
||||
vm_config->memory.start_hpa + vm_config->memory.size);
|
||||
sos_vm_config->memory.size -= vm_config->memory.size;
|
||||
|
||||
/* if HPA2 is available, filter it out as well*/
|
||||
if (vm_config->memory.size_hpa2 != 0UL) {
|
||||
filter_mem_from_sos_e820(vm, vm_config->memory.start_hpa2,
|
||||
vm_config->memory.start_hpa2 + vm_config->memory.size_hpa2);
|
||||
sos_vm_config->memory.size -= vm_config->memory.size_hpa2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -37,8 +37,9 @@ enum acrn_vm_load_order {
|
||||
struct acrn_vm_mem_config {
|
||||
uint64_t start_hpa; /* the start HPA of VM memory configuration, for pre-launched VMs only */
|
||||
uint64_t size; /* VM memory size configuration */
|
||||
uint64_t start_hpa2; /* the start HPA of VM memory configuration, for pre-launched VMs only */
|
||||
uint64_t size_hpa2; /* VM shared memory size configuration */
|
||||
uint64_t start_hpa2; /* Start of second HPA for non-contiguous allocations in VM memory configuration,
|
||||
for pre-launched VMs only */
|
||||
uint64_t size_hpa2; /* Size of second HPA for non-contiguous allocations in VM memory configuration */
|
||||
};
|
||||
|
||||
struct target_vuart {
|
||||
|
Loading…
Reference in New Issue
Block a user