mirror of https://gitee.com/openkylin/linux.git
kvm: fix compilation on s390
s390 does not have memremap, even though in this particular case it would be useful. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
382409b4c4
commit
d30b214d1d
|
@ -1761,8 +1761,10 @@ static int __kvm_map_gfn(struct kvm_memory_slot *slot, gfn_t gfn,
|
||||||
if (pfn_valid(pfn)) {
|
if (pfn_valid(pfn)) {
|
||||||
page = pfn_to_page(pfn);
|
page = pfn_to_page(pfn);
|
||||||
hva = kmap(page);
|
hva = kmap(page);
|
||||||
|
#ifdef CONFIG_HAS_IOMEM
|
||||||
} else {
|
} else {
|
||||||
hva = memremap(pfn_to_hpa(pfn), PAGE_SIZE, MEMREMAP_WB);
|
hva = memremap(pfn_to_hpa(pfn), PAGE_SIZE, MEMREMAP_WB);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hva)
|
if (!hva)
|
||||||
|
|
Loading…
Reference in New Issue