lkml.org 
[lkml]   [2006]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC, PATCH 5/24] i386 Vmi code patching
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-15 23:09    [W:0.162 / U:1.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site