From: Gerd Hoffmann <kraxel@suse.de>
To: Emmanuel Ackaouy <ack@xensource.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [patch 2/5] libelf: use for x86 dom0 builder.
Date: Thu, 25 Jan 2007 08:59:56 +0100 [thread overview]
Message-ID: <45B8637C.1070908@suse.de> (raw)
In-Reply-To: <3dd0e279c6c66796d005d6634954af7d@xensource.com>
Emmanuel Ackaouy wrote:
>>>> +#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.
>
> Can you explain what ia64 or ppc have to do with lines that are commented
> out?
ia64 should work in theory, cross-compiling worked last time I tried,
didn't boot it though due to lack of hardware.
ppc(64) needs adaptions, simliar to the changes in
xen/arch/x86/domain_build.c and xen/arch/ia64/xen/domain.c
>>>> + /* 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.
>
> I'm not sure I follow. Are you suggesting we replace ifdefs with run
> time checks because the compiler will deal with it?
Yes.
CONFIG_COMPAT is partly handled that way too: with compat=n the
IS_COMPAT() macro is defined to 0, and gcc will optimize out the
conditional code which can run with compat=y only.
>>> 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.
>
> I didn't suggest printing nothing when the combination is compatible.
I don't see the point in rearranging the code then.
cheers,
Gerd
--
Gerd Hoffmann <kraxel@suse.de>
next prev parent reply other threads:[~2007-01-25 7:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-23 14:53 [patch 0/5] libelf: new elf parser for xen Gerd Hoffmann
2007-01-23 14:53 ` [patch 1/5] add libelf: an ELF binary parser library Gerd Hoffmann
2007-01-23 15:27 ` Christoph Egger
2007-01-23 19:03 ` Emmanuel Ackaouy
2007-01-24 8:34 ` Gerd Hoffmann
2007-01-23 14:53 ` [patch 2/5] libelf: use for x86 dom0 builder Gerd Hoffmann
2007-01-23 19:10 ` Emmanuel Ackaouy
2007-01-24 8:41 ` Gerd Hoffmann
2007-01-24 21:00 ` Emmanuel Ackaouy
2007-01-25 7:59 ` Gerd Hoffmann [this message]
2007-01-23 14:53 ` [patch 3/5] libelf: add to libxc Gerd Hoffmann
2007-01-23 14:53 ` [patch 4/5] libelf: use for hvm builder Gerd Hoffmann
2007-01-23 14:53 ` [patch 5/5] libelf: use for readnotes utility Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45B8637C.1070908@suse.de \
--to=kraxel@suse.de \
--cc=ack@xensource.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.