summaryrefslogtreecommitdiffstats
path: root/drivers/s390/kvm/kvm_virtio.c
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2008-11-14 18:18:02 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-11-14 18:18:52 +0100
commitcc835f7872adef35076e4a3b6632ef79bb4805be (patch)
tree6b416046f989877926db0457cfc80e9805fc5c7e /drivers/s390/kvm/kvm_virtio.c
parent675be97a32a5f12650b86391b7431f1e10811f1e (diff)
downloadlinux-cc835f7872adef35076e4a3b6632ef79bb4805be.tar.bz2
[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>
Diffstat (limited to 'drivers/s390/kvm/kvm_virtio.c')
-rw-r--r--drivers/s390/kvm/kvm_virtio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c
index ff4a6931bb8e..3d442444c618 100644
--- a/drivers/s390/kvm/kvm_virtio.c
+++ b/drivers/s390/kvm/kvm_virtio.c
@@ -322,13 +322,13 @@ static int __init kvm_devices_init(void)
return rc;
}
- rc = vmem_add_mapping(PFN_PHYS(max_pfn), PAGE_SIZE);
+ rc = vmem_add_mapping(real_memory_size, PAGE_SIZE);
if (rc) {
s390_root_dev_unregister(kvm_root);
return rc;
}
- kvm_devices = (void *) PFN_PHYS(max_pfn);
+ kvm_devices = (void *) real_memory_size;
ctl_set_bit(0, 9);
register_external_interrupt(0x2603, kvm_extint_handler);