kvm: fix compile on s390 part 2
authorChristian Borntraeger <borntraeger@de.ibm.com>
Mon, 27 May 2019 08:28:25 +0000 (10:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Apr 2020 14:31:18 +0000 (16:31 +0200)
commit eb1f2f387db8c0d084581fb26e7faffde700bc8e upstream.

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>
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
virt/kvm/kvm_main.c

index f99b99b77a48653cd3bfca927e9d2b1c6f331fec..5b949aa273de519347a7971e53540bbcfae17a9e 100644 (file)
@@ -1756,8 +1756,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);