kvm: fix compile on s390 part 2
authorChristian Borntraeger <borntraeger@de.ibm.com>
Mon, 27 May 2019 08:28:25 +0000 (10:28 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 28 May 2019 13:51:52 +0000 (15:51 +0200)
We also need to fence the memunmap part.

Fixes: e45adf665a53 ("KVM: Introduce a new guest mapping API")
Fixes: d30b214d1d0a (kvm: fix compilation on s390)
Cc: Michal Kubecek <mkubecek@suse.cz>
Cc: KarimAllah Ahmed <karahmed@amazon.de>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
virt/kvm/kvm_main.c

index 134ec0283a8aeb0091c9f795d7c373daf5576cbc..301089a462c4c0a545b22240787ffc2ddaef41b8 100644 (file)
@@ -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);