[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190527063828.3F883E00A9@unicorn.suse.cz>
Date: Mon, 27 May 2019 08:38:28 +0200 (CEST)
From: Michal Kubecek <mkubecek@...e.cz>
To: kvm@...r.kernel.org
Cc: Paolo Bonzini <pbonzini@...hat.com>,
"Radim Krcmar" <rkrcmar@...hat.com>,
KarimAllah Ahmed <karahmed@...zon.de>,
linux-kernel@...r.kernel.org
Subject: [PATCH] kvm: memunmap() also needs HAS_IOMEM
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@...e.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
Powered by blists - more mailing lists