Re: [kvm-devel] [RFC/PATCH 15/15] guest: virtio device support, and kvm hypercalls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rusty Russell wrote:
>> +static int __init kvm_devices_init(void)
>> +{
>> +	if (!MACHINE_IS_KVM)
>> +		return -ENODEV;
>> +
>> +	if (device_register(&kvm_root) != 0)
>> +		panic("Could not register kvm root");
>> +
>> +	if (add_shared_memory((max_pfn) << PAGE_SHIFT, PAGE_SIZE)) {
>> +		device_unregister(&kvm_root);
>> +		return -ENOMEM;
>> +	}
> 
> Hmm, panic on device_register fail, but -ENOMEM on add_shared_memory fail?
> My theory was that since this is boot time, panic() is the right thing.
We can't tell whether or not this is an important device or not. Maybe 
the guest is running with ramdisk as rootfs and can have a happy life 
if we don't kill it here. Return the rc from device register seems to 
be the right thing to me, if it was an important device we'll see 
"panic: cannot mount rootfs" or something later.
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization

[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux