summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-05-20 12:06:36 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-29 16:31:18 +0200
commitbef6507903d91be2d1a06c11d980a722b176bc09 (patch)
tree7d9e1e4ae922019ae5c5aa5c2577408c916ffd3d /virt
parent94659e93c93c23dfaada78aaad45183867698f74 (diff)
downloadlinux-stable-bef6507903d91be2d1a06c11d980a722b176bc09.tar.gz
linux-stable-bef6507903d91be2d1a06c11d980a722b176bc09.tar.bz2
linux-stable-bef6507903d91be2d1a06c11d980a722b176bc09.zip
kvm: fix compilation on s390
commit d30b214d1d0addb7b2c9c78178d1501cd39a01fb upstream. s390 does not have memremap, even though in this particular case it would be useful. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'virt')
-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 4a5ea263edf6..f99b99b77a48 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1722,8 +1722,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)