[PATCH] kvm/book3s: fix build error caused by gfn_to_hva_memslot()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The build error was caused by that builtin functions are calling
the functions implemented in modules. That was introduced by the
following commit.

commit 4d8b81abc47b83a1939e59df2fdb0e98dfe0eedd

The patches fix that to convert the gfn to hva in direct way.

Signed-off-by: Gavin Shan <shangw@xxxxxxxxxxxxxxxxxx>
---
diff --git a/arch/powerpc/kvm/book3s_hv_rm_mmu.c b/arch/powerpc/kvm/book3s_hv_rm_mmu.c
index 56ac1a5..0958523 100644
--- a/arch/powerpc/kvm/book3s_hv_rm_mmu.c
+++ b/arch/powerpc/kvm/book3s_hv_rm_mmu.c
@@ -197,7 +197,8 @@ long kvmppc_h_enter(struct kvm_vcpu *vcpu, unsigned long flags,
 		pa &= PAGE_MASK;
 	} else {
 		/* Translate to host virtual address */
-		hva = gfn_to_hva_memslot(memslot, gfn);
+		hva = memslot->userspace_addr +
+			(gfn - memslot->base_gfn) * PAGE_SIZE;
 
 		/* Look up the Linux PTE for the backing page */
 		pte_size = psize;

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux