diff options
-rw-r--r-- | drivers/s390/kvm/kvm_virtio.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c index 6711e65764b5..2ea6165366b6 100644 --- a/drivers/s390/kvm/kvm_virtio.c +++ b/drivers/s390/kvm/kvm_virtio.c | |||
@@ -443,29 +443,30 @@ static int __init test_devices_support(unsigned long addr) | |||
443 | } | 443 | } |
444 | /* | 444 | /* |
445 | * Init function for virtio | 445 | * Init function for virtio |
446 | * devices are in a single page above top of "normal" mem | 446 | * devices are in a single page above top of "normal" + standby mem |
447 | */ | 447 | */ |
448 | static int __init kvm_devices_init(void) | 448 | static int __init kvm_devices_init(void) |
449 | { | 449 | { |
450 | int rc; | 450 | int rc; |
451 | unsigned long total_memory_size = sclp_get_rzm() * sclp_get_rnmax(); | ||
451 | 452 | ||
452 | if (!MACHINE_IS_KVM) | 453 | if (!MACHINE_IS_KVM) |
453 | return -ENODEV; | 454 | return -ENODEV; |
454 | 455 | ||
455 | if (test_devices_support(real_memory_size) < 0) | 456 | if (test_devices_support(total_memory_size) < 0) |
456 | return -ENODEV; | 457 | return -ENODEV; |
457 | 458 | ||
458 | rc = vmem_add_mapping(real_memory_size, PAGE_SIZE); | 459 | rc = vmem_add_mapping(total_memory_size, PAGE_SIZE); |
459 | if (rc) | 460 | if (rc) |
460 | return rc; | 461 | return rc; |
461 | 462 | ||
462 | kvm_devices = (void *) real_memory_size; | 463 | kvm_devices = (void *) total_memory_size; |
463 | 464 | ||
464 | kvm_root = root_device_register("kvm_s390"); | 465 | kvm_root = root_device_register("kvm_s390"); |
465 | if (IS_ERR(kvm_root)) { | 466 | if (IS_ERR(kvm_root)) { |
466 | rc = PTR_ERR(kvm_root); | 467 | rc = PTR_ERR(kvm_root); |
467 | printk(KERN_ERR "Could not register kvm_s390 root device"); | 468 | printk(KERN_ERR "Could not register kvm_s390 root device"); |
468 | vmem_remove_mapping(real_memory_size, PAGE_SIZE); | 469 | vmem_remove_mapping(total_memory_size, PAGE_SIZE); |
469 | return rc; | 470 | return rc; |
470 | } | 471 | } |
471 | 472 | ||