[S390] kvm_s390: Fix oops in virtio device detection with "mem="

The current virtio model on s390 has the descriptor page above the main
memory. The guest virtio detection will oops if the mem= parameter is
used to reduce/change the memory size.
We have to use real_memory_size instead of max_pfn to detect the virtio
descriptor pages.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>

authored by Christian Borntraeger and committed by Martin Schwidefsky cc835f78 675be97a

+2 -2
+2 -2
drivers/s390/kvm/kvm_virtio.c
··· 322 322 return rc; 323 323 } 324 324 325 - rc = vmem_add_mapping(PFN_PHYS(max_pfn), PAGE_SIZE); 325 + rc = vmem_add_mapping(real_memory_size, PAGE_SIZE); 326 326 if (rc) { 327 327 s390_root_dev_unregister(kvm_root); 328 328 return rc; 329 329 } 330 330 331 - kvm_devices = (void *) PFN_PHYS(max_pfn); 331 + kvm_devices = (void *) real_memory_size; 332 332 333 333 ctl_set_bit(0, 9); 334 334 register_external_interrupt(0x2603, kvm_extint_handler);