acrn-config: Add non-contiguous HPA to currently supported hardware.

For currently supported hardware such as KNL NUC, the scenario xml
file is not generated and the newly added non-contiguous variables
will not be present. This can lead to build issues. This patch adds
the second non-contiguous HPA variable to all supported hardware
for both logical_partition and hybrid modes. It also adds checks
to ensure that HPA2 is valid before using it while creating the
guest VM ve820.

Tracked-On: #4242
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
Vijay Dhanraj
2019-12-11 22:07:18 -08:00
committed by wenlingz
parent 2777f23075
commit 1636ac0416
14 changed files with 46 additions and 2 deletions

View File

@@ -45,8 +45,12 @@ def ve820_per_launch(config, hpa_size, hpa2_size):
low_mem_hpa_len.append(511 * 1024 * 1024)
high_mem_hpa_len.append(int(hpa_size[i], 16) - 512 * 1024 * 1024)
#HPA2 is always allocated in >4G space.
high_mem_hpa2_len.append(int(hpa2_size[i], 16))
if len(hpa2_size) == 0:
high_mem_hpa2_len.append(0)
else:
high_mem_hpa2_len.append(int(hpa2_size[i], 16))
#HPA2 is always allocated in >4G space.
if (high_mem_hpa_len[i] != 0) and (high_mem_hpa2_len[i] != 0):
high_mem_hpa2_addr.append(FOUR_GBYTE + high_mem_hpa_len[i])
else: