summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-05-20 12:06:36 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2019-05-24 21:27:07 +0200
commitd30b214d1d0addb7b2c9c78178d1501cd39a01fb (patch)
tree3d99fb1da4e13a80027e7ceee4477bbdaf46b098
parent382409b4c43e5b44ae4a869ff793d3cf01d12004 (diff)
downloadlinux-d30b214d1d0addb7b2c9c78178d1501cd39a01fb.tar.bz2
kvm: fix compilation on s390
s390 does not have memremap, even though in this particular case it would be useful. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--virt/kvm/kvm_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 1fadfb9cf36e..134ec0283a8a 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1761,8 +1761,10 @@ static int __kvm_map_gfn(struct kvm_memory_slot *slot, gfn_t gfn,
if (pfn_valid(pfn)) {
page = pfn_to_page(pfn);
hva = kmap(page);
+#ifdef CONFIG_HAS_IOMEM
} else {
hva = memremap(pfn_to_hpa(pfn), PAGE_SIZE, MEMREMAP_WB);
+#endif
}
if (!hva)