diff --git a/hypervisor/arch/x86/guest/vm.c b/hypervisor/arch/x86/guest/vm.c index 2833be663..df8970a15 100644 --- a/hypervisor/arch/x86/guest/vm.c +++ b/hypervisor/arch/x86/guest/vm.c @@ -91,7 +91,7 @@ int create_vm(struct vm_description *vm_desc, struct acrn_vm **rtn_vm) vm->hw.gpa_lowtop = 0UL; init_ept_mem_ops(vm); - vm->arch_vm.nworld_eptp = vm->arch_vm.ept_mem_ops.get_pml4_page(vm->arch_vm.ept_mem_ops.info, 0UL); + vm->arch_vm.nworld_eptp = vm->arch_vm.ept_mem_ops.get_pml4_page(vm->arch_vm.ept_mem_ops.info); sanitize_pte((uint64_t *)vm->arch_vm.nworld_eptp); /* Only for SOS: Configure VM software information */ diff --git a/hypervisor/arch/x86/mmu.c b/hypervisor/arch/x86/mmu.c index 0345654d9..f9fee0b38 100644 --- a/hypervisor/arch/x86/mmu.c +++ b/hypervisor/arch/x86/mmu.c @@ -237,7 +237,7 @@ void init_paging(void) pr_dbg("HV MMU Initialization"); /* Allocate memory for Hypervisor PML4 table */ - ppt_mmu_pml4_addr = ppt_mem_ops.get_pml4_page(ppt_mem_ops.info, 0UL); + ppt_mmu_pml4_addr = ppt_mem_ops.get_pml4_page(ppt_mem_ops.info); init_e820(); obtain_e820_mem_info(); diff --git a/hypervisor/arch/x86/page.c b/hypervisor/arch/x86/page.c index 610751cec..d8909aa0b 100644 --- a/hypervisor/arch/x86/page.c +++ b/hypervisor/arch/x86/page.c @@ -28,7 +28,7 @@ static inline uint64_t ppt_pgentry_present(uint64_t pte) return pte & PAGE_PRESENT; } -static inline struct page *ppt_get_pml4_page(const union pgtable_pages_info *info, __unused uint64_t gpa) +static inline struct page *ppt_get_pml4_page(const union pgtable_pages_info *info) { struct page *page = info->ppt.pml4_base; (void)memset(page, 0U, PAGE_SIZE); @@ -101,7 +101,7 @@ static inline uint64_t ept_pgentry_present(uint64_t pte) return pte & EPT_RWX; } -static inline struct page *ept_get_pml4_page(const union pgtable_pages_info *info, __unused uint64_t gpa) +static inline struct page *ept_get_pml4_page(const union pgtable_pages_info *info) { struct page *page = info->ept.nworld_pml4_base; (void)memset(page, 0U, PAGE_SIZE); diff --git a/hypervisor/dm/vpci/pci_pt.c b/hypervisor/dm/vpci/pci_pt.c index b6d5bcdac..36f2ee00f 100644 --- a/hypervisor/dm/vpci/pci_pt.c +++ b/hypervisor/dm/vpci/pci_pt.c @@ -68,7 +68,7 @@ static int vdev_pt_init(struct pci_vdev *vdev) /* Create an iommu domain for target VM if not created */ if (vm->iommu == NULL) { if (vm->arch_vm.nworld_eptp == 0UL) { - vm->arch_vm.nworld_eptp = vm->arch_vm.ept_mem_ops.get_pml4_page(vm->arch_vm.ept_mem_ops.info, 0UL); + vm->arch_vm.nworld_eptp = vm->arch_vm.ept_mem_ops.get_pml4_page(vm->arch_vm.ept_mem_ops.info); sanitize_pte((uint64_t *)vm->arch_vm.nworld_eptp); } vm->iommu = create_iommu_domain(vm->vm_id, diff --git a/hypervisor/include/arch/x86/page.h b/hypervisor/include/arch/x86/page.h index e7ce39f97..8ae633f62 100644 --- a/hypervisor/include/arch/x86/page.h +++ b/hypervisor/include/arch/x86/page.h @@ -57,7 +57,7 @@ struct memory_ops { union pgtable_pages_info *info; uint64_t (*get_default_access_right)(void); uint64_t (*pgentry_present)(uint64_t pte); - struct page *(*get_pml4_page)(const union pgtable_pages_info *info, uint64_t gpa); + struct page *(*get_pml4_page)(const union pgtable_pages_info *info); struct page *(*get_pdpt_page)(const union pgtable_pages_info *info, uint64_t gpa); struct page *(*get_pd_page)(const union pgtable_pages_info *info, uint64_t gpa); struct page *(*get_pt_page)(const union pgtable_pages_info *info, uint64_t gpa);