From 925503ce36b78fd2b44c21148eaaef83afc5cdd0 Mon Sep 17 00:00:00 2001 From: Sainath Grandhi Date: Thu, 23 Aug 2018 12:53:15 -0700 Subject: [PATCH] hv: Build fix - ACRN partition mode Patch to fix compile issue. Signed-off-by: Sainath Grandhi --- hypervisor/arch/x86/guest/vm.c | 5 +++-- hypervisor/dm/vpci/pci_pt.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hypervisor/arch/x86/guest/vm.c b/hypervisor/arch/x86/guest/vm.c index 813126c23..790cfac9a 100644 --- a/hypervisor/arch/x86/guest/vm.c +++ b/hypervisor/arch/x86/guest/vm.c @@ -173,8 +173,9 @@ int create_vm(struct vm_description *vm_desc, struct vm **rtn_vm) &vm_desc->GUID[0], sizeof(vm_desc->GUID)); #ifdef CONFIG_PARTITION_MODE - ept_mr_add(vm, vm_desc->start_hpa, - 0UL, vm_desc->mem_size, EPT_RWX|EPT_WB); + ept_mr_add(vm, (uint64_t *)vm->arch_vm.nworld_eptp, + vm_desc->start_hpa, 0UL, vm_desc->mem_size, + EPT_RWX|EPT_WB); init_vm_boot_info(vm); #endif } diff --git a/hypervisor/dm/vpci/pci_pt.c b/hypervisor/dm/vpci/pci_pt.c index a78cb69a4..3b4d7af39 100644 --- a/hypervisor/dm/vpci/pci_pt.c +++ b/hypervisor/dm/vpci/pci_pt.c @@ -215,7 +215,7 @@ static int vdev_pt_remap_bar(struct pci_vdev *vdev, uint32_t idx, if (new_base != 0U) { /* Map the physical BAR in the guest MMIO space */ - error = ept_mr_add(vm, + error = ept_mr_add(vm, (uint64_t *)vm->arch_vm.nworld_eptp, vdev->pdev.bar[idx].base, /* HPA */ new_base, /*GPA*/ vdev->bar[idx].size,