mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 17:58:30 +00:00
hv: mmu: add static paging table allocation for hypervisor
Add static paging table allocation API for hypervisor. Note: must configure PLATFORM_RAM_SIZE and PLATFORM_MMIO_SIZE exactly as the platform. Rename RAM_START/RAM_SIZE to HV_RAM_START/HV_RAM_SIZE for HV. Tracked-On: #861 Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
@@ -383,7 +383,7 @@ static int32_t local_set_vm_memory_region(struct vm *vm,
|
||||
if (((hpa <= base_paddr) &&
|
||||
((hpa + region->size) > base_paddr)) ||
|
||||
((hpa >= base_paddr) &&
|
||||
(hpa < (base_paddr + CONFIG_RAM_SIZE)))) {
|
||||
(hpa < (base_paddr + CONFIG_HV_RAM_SIZE)))) {
|
||||
pr_err("%s: overlap the HV memory region.", __func__);
|
||||
return -EFAULT;
|
||||
}
|
||||
@@ -515,7 +515,7 @@ static int32_t write_protect_page(struct vm *vm,const struct wp_data *wp)
|
||||
base_paddr = get_hv_image_base();
|
||||
if (((hpa <= base_paddr) && (hpa + CPU_PAGE_SIZE > base_paddr)) ||
|
||||
((hpa >= base_paddr) &&
|
||||
(hpa < base_paddr + CONFIG_RAM_SIZE))) {
|
||||
(hpa < base_paddr + CONFIG_HV_RAM_SIZE))) {
|
||||
pr_err("%s: overlap the HV memory region.", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user