[RFC, PATCH 5/24] i386 Vmi code patching

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

 



Zachary Amsden wrote:
> +void __init vmi_init(void)
> +{
> +	int romsize;
> +
> +	/*
> +	 * Setup optional callback functions if we found the VMI ROM
> +	 */
> +	if (hypervisor_found) {
> +		romsize = vmi_rom->romLength * 512;
> +		if (VROMFunc(vmi_rom, VMI_CALL_Init)) {
> +			printk(KERN_WARNING "VMI ROM failed to initialize\n");
> +			hypervisor_found = 0;
> +		} else {
> +			memcpy(&__VMI_START, (char *)vmi_rom, romsize);
> +			scan_builtin_annotations();
> +		}
> +	}
> +	if (!vmi_rom) 
> +		printk(KERN_WARNING "VMI ROM not found"
> +		       " - falling back to native mode\n");
> +	else if (!hypervisor_found)
> +		printk(KERN_WARNING "VMI ROM version mismatch "
> +		       "(kernel requires version >= %d.%d) "
> +		       " - falling back to native mode\n",
> +		       VMI_API_REV_MAJOR, MIN_VMI_API_REV_MINOR);
> +}
>   
Minor nitpick.

The error logic here is somewhat confusing.  If a VMI_CALL_Init results 
in a failure, you end up with:

  VMI ROM failed to initialize
  VMI ROM version mismatch (kernel requires version >= 13.0) - falling 
back to native mode

The later error is misleading as the version may actually match.  The 
nesting here probably could be simplified to.

Regards,

Anthony Liguori


[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