From: ebiederm@xmission.com (Eric W. Biederman)
To: "Huang, Ying" <ying.huang@intel.com>
Cc: ak@suse.de, akpm@linux-foundation.org,
Yinghai Lu <yhlu.kernel@gmail.com>,
Randy Dunlap <randy.dunlap@oracle.com>,
Chandramouli Narayanan <mouli@linux.intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/5] x86_64 EFI support -v3
Date: Wed, 01 Aug 2007 11:21:59 -0600 [thread overview]
Message-ID: <m1myxbnpag.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <1185872127.23149.81.camel@caritas-dev.intel.com> (Ying Huang's message of "Tue, 31 Jul 2007 16:55:27 +0800")
"Huang, Ying" <ying.huang@intel.com> writes:
> On Mon, 2007-07-30 at 22:16 -0600, Eric W. Biederman wrote:
>> "Huang, Ying" <ying.huang@intel.com> writes:
>> > - The variable efi_enabled is used throughout across architecutres if
>> > CONFIG_EFI option is enabled. The i386 code also uses this variable.
>> > This is something that can be revisited with code consolidation
>> > across architectures.
>>
>> Fix it first. arch/i386/ efi support is horrible, and show what happens
>> when things are not done properly the first time. Later doesn't happen.
>> With the partvirt logic we have a lot of operations properly split out
>> already. Figure out how to use them.
>
> What do you suggest to use instead of efi_enabled?
>
> Current method is (efi_enabled based):
>
> (1) Encapsulate EFI based implementation and legacy BIOS based
> implementation into separate functions.
> (2) Define a wrapper function for each interface in (1), efi_enabled is
> used to choose implementation between EFI and legacy BIOS.
>
> Another possible method is (function pointer based):
Exactly. Which is what everything else in the kernel does and is
extensible.
> 1. Encapsulate EFI based implementation and legacy BIOS based
> implementation into separate functions.
> 2. Define a function pointer for each interface in (1), the function
> pointer is set to legacy BIOS based implementation by default and
> changed to EFI based implementation if appropriate.
>
> Because there are only two possible choice, I think the function pointer
> based method has no big advantages over the efi_enabled based method.
Not at all every hypervisor does these things differently as well,
so in the real world there are a lot of choices.
Eric
next prev parent reply other threads:[~2007-08-01 17:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-31 3:12 [PATCH 0/5] x86_64 EFI support -v3 Huang, Ying
2007-07-31 4:16 ` Eric W. Biederman
2007-07-31 8:55 ` Huang, Ying
2007-08-01 17:21 ` Eric W. Biederman [this message]
2007-07-31 4:47 ` Eric W. Biederman
2007-08-06 5:40 ` Huang, Ying
2007-08-08 16:45 ` Eric W. Biederman
2007-08-08 20:41 ` Andi Kleen
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=m1myxbnpag.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mouli@linux.intel.com \
--cc=randy.dunlap@oracle.com \
--cc=yhlu.kernel@gmail.com \
--cc=ying.huang@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).