]> git.baikalelectronics.ru Git - kernel.git/commitdiff
kvm: fix compilation on s390
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 20 May 2019 10:06:36 +0000 (12:06 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 24 May 2019 19:27:07 +0000 (21:27 +0200)
s390 does not have memremap, even though in this particular case it
would be useful.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/kvm_main.c

index 1fadfb9cf36ecd07731383dcfced7ac792749668..134ec0283a8aeb0091c9f795d7c373daf5576cbc 100644 (file)
@@ -1761,8 +1761,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)