WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [patch 2/5] libelf: use for x86 dom0 builder.

To: Emmanuel Ackaouy <ack@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [patch 2/5] libelf: use for x86 dom0 builder.
From: Gerd Hoffmann <kraxel@xxxxxxx>
Date: Wed, 24 Jan 2007 09:41:23 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 24 Jan 2007 00:40:56 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <6b41881e10b3a4b8a282b811b53684b3@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070123145344.754866428@xxxxxxx> <20070123145409.269613149@xxxxxxx> <6b41881e10b3a4b8a282b811b53684b3@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.9 (X11/20060911)
  Hi,

>> -obj-y += elf.o
>> -obj-$(CONFIG_COMPAT) += elf32.o
>> +#obj-y += elf.o
>> +#obj-$(CONFIG_COMPAT) += elf32.o
> 
> Can we just zap those lines?

Once ia64 is tested and ppc dom0 builder is ported over to libelf we can.

>> +    /* compatibility check */
>> +    compatible = 0;
>> +    compat32   = 0;
>> +    machine = elf_uval(&elf, elf.ehdr, e_machine);
>> +    switch (CONFIG_PAGING_LEVELS) {
> 
> Can we make this a compile time check instead of run-time?

CONFIG_PAGING_LEVELS is a constant, thus it actually is compile-time,
the gcc optimizer should throw away the unused code paths.  I prefer
this way over cluttering the source with #ifdefs.

> Also, it
> would seem easier to do all the checks first and then do a printk
> specifying which kernel we found and, if it's not compatible with the
> hypervisor, why not.

I intentionally print kernel and xen type unconditionally.  I think it
is useful to have that information in the log, even if the combination
is not incompatible.

cheers,
  Gerd

-- 
Gerd Hoffmann <kraxel@xxxxxxx>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel