Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 373275
b: refs/heads/master
c: edefc71
h: refs/heads/master
i:
  373273: 98164f0
  373271: b8efd69
v: v3
  • Loading branch information
Nick Wang authored and Martin Schwidefsky committed May 2, 2013
1 parent 0032fdb commit 9d0d8d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7b1e427d685e2aee91f9a622f9c2691130f8e57d
refs/heads/master: edefc7107afedd6bd59e80bc0586ddb276edfcbe
11 changes: 6 additions & 5 deletions trunk/drivers/s390/kvm/kvm_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,29 +443,30 @@ static int __init test_devices_support(unsigned long addr)
}
/*
* Init function for virtio
* devices are in a single page above top of "normal" mem
* devices are in a single page above top of "normal" + standby mem
*/
static int __init kvm_devices_init(void)
{
int rc;
unsigned long total_memory_size = sclp_get_rzm() * sclp_get_rnmax();

if (!MACHINE_IS_KVM)
return -ENODEV;

if (test_devices_support(real_memory_size) < 0)
if (test_devices_support(total_memory_size) < 0)
return -ENODEV;

rc = vmem_add_mapping(real_memory_size, PAGE_SIZE);
rc = vmem_add_mapping(total_memory_size, PAGE_SIZE);
if (rc)
return rc;

kvm_devices = (void *) real_memory_size;
kvm_devices = (void *) total_memory_size;

kvm_root = root_device_register("kvm_s390");
if (IS_ERR(kvm_root)) {
rc = PTR_ERR(kvm_root);
printk(KERN_ERR "Could not register kvm_s390 root device");
vmem_remove_mapping(real_memory_size, PAGE_SIZE);
vmem_remove_mapping(total_memory_size, PAGE_SIZE);
return rc;
}

Expand Down

0 comments on commit 9d0d8d9

Please sign in to comment.