hv: fix coding style violations in mmu.c

Fix violations that attempt to change parameter
 passed by value.

Tracked-On: #2056
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Yonghua Huang 2018-12-26 17:49:53 +08:00 committed by wenlingz
parent c1fc7f5fce
commit 55691aed46

View File

@ -222,14 +222,16 @@ void enable_smap(void)
*/ */
void hv_access_memory_region_update(uint64_t base, uint64_t size) void hv_access_memory_region_update(uint64_t base, uint64_t size)
{ {
uint64_t base_aligned;
uint64_t size_aligned;
uint64_t region_end = base + size; uint64_t region_end = base + size;
/*rounddown base to 2MBytes aligned.*/ /*rounddown base to 2MBytes aligned.*/
base = round_pde_down(base); base_aligned = round_pde_down(base);
size = region_end - base; size_aligned = region_end - base_aligned;
mmu_modify_or_del((uint64_t *)ppt_mmu_pml4_addr, base, round_pde_up(size), mmu_modify_or_del((uint64_t *)ppt_mmu_pml4_addr, base_aligned,
0UL, PAGE_USER, &ppt_mem_ops, MR_MODIFY); round_pde_up(size_aligned), 0UL, PAGE_USER, &ppt_mem_ops, MR_MODIFY);
} }
void init_paging(void) void init_paging(void)