Skip to content

Commit

Permalink
kvm: fix compilation on s390
Browse files Browse the repository at this point in the history
s390 does not have memremap, even though in this particular case it
would be useful.

Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
bonzini committed May 24, 2019
1 parent 382409b commit d30b214
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d30b214

Please sign in to comment.