All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm: memunmap() also needs HAS_IOMEM
@ 2019-05-27  6:38 Michal Kubecek
  0 siblings, 0 replies; only message in thread
From: Michal Kubecek @ 2019-05-27  6:38 UTC (permalink / raw)
  To: kvm; +Cc: Paolo Bonzini, Radim Krcmar, KarimAllah Ahmed, linux-kernel

Commit d30b214d1d0a ("kvm: fix compilation on s390") addresses link error
(undefined reference to memremap) without HAS_IOMEM but memunmap() is also
only available with HAS_IOMEM enabled so that we need similar fix in
kvm_vcpu_unmap().

Fixes: e45adf665a53 ("KVM: Introduce a new guest mapping API")
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
---
 virt/kvm/kvm_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 134ec0283a8a..301089a462c4 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1795,8 +1795,10 @@ void kvm_vcpu_unmap(struct kvm_vcpu *vcpu, struct kvm_host_map *map,
 
 	if (map->page)
 		kunmap(map->page);
+#ifdef CONFIG_HAS_IOMEM
 	else
 		memunmap(map->hva);
+#endif
 
 	if (dirty) {
 		kvm_vcpu_mark_page_dirty(vcpu, map->gfn);
-- 
2.21.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-27  6:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-27  6:38 [PATCH] kvm: memunmap() also needs HAS_IOMEM Michal Kubecek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.