mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: "Huang, Ying" <ying.huang@intel.com>
Cc: akpm@linux-foundation.org, "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Andi Kleen <ak@suse.de>,
	Chandramouli Narayanan <mouli@linux.intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3 -v4] x86_64 EFI runtime service support: EFI basic runtime service support
Date: Thu, 25 Oct 2007 11:01:54 -0600	[thread overview]
Message-ID: <m1myu75drx.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <1193295473.23935.202.camel@caritas-dev.intel.com> (Ying Huang's message of "Thu, 25 Oct 2007 14:57:53 +0800")

"Huang, Ying" <ying.huang@intel.com> writes:

> +static void __init efi_call_phys_prelog(void) __acquires(efi_lock)
> +{
> +	unsigned long vaddress;
> +
> +	/*
> +	 * Lock sequence is different from normal case because
> +	 * efi_flags is global
> +	 */
> +	spin_lock(&efi_lock);
> +	local_irq_save(efi_flags);
> +	early_runtime_code_mapping_set_exec(1);
> +	vaddress = (unsigned long)__va(0x0UL);
> +	pgd_val(save_pgd) = pgd_val(*pgd_offset_k(0x0UL));
> +	set_pgd(pgd_offset_k(0x0UL), *pgd_offset_k(vaddress));
> +	global_flush_tlb();
> +}
> +
> +static void __init efi_call_phys_epilog(void) __releases(efi_lock)
> +{
> +	/*
> +	 * After the lock is released, the original page table is restored.
> +	 */
> +	set_pgd(pgd_offset_k(0x0UL), save_pgd);
> +	early_runtime_code_mapping_set_exec(0);
> +	global_flush_tlb();
> +	local_irq_restore(efi_flags);
> +	spin_unlock(&efi_lock);
> +}
> +
> +static efi_status_t __init phys_efi_set_virtual_address_map(
> +	unsigned long memory_map_size,
> +	unsigned long descriptor_size,
> +	u32 descriptor_version,
> +	efi_memory_desc_t *virtual_map)
> +{
> +	efi_status_t status;
> +
> +	efi_call_phys_prelog();
> +	status = lin2win4((void *)efi_phys.set_virtual_address_map,
> +			  (u64)memory_map_size, (u64)descriptor_size,
> +			  (u64)descriptor_version, (u64)virtual_map);
> +	efi_call_phys_epilog();
> +	return status;
> +}

So you still have this piece of code which makes a kernel using
efi not compatible with kexec.  But you are still supporting a physical
call mode for efi.  If you are going to do this can we please just
remove the hacks that make the EFI physical call mode early boot only
and just always use that mode.  Depending on weird call once functions
like efi_set_virtual_address_map makes me very uncomfortable.

Eric

  parent reply	other threads:[~2007-10-25 17:02 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25  6:57 Huang, Ying
2007-10-25 16:09 ` Thomas Gleixner
2007-10-25 16:28   ` H. Peter Anvin
2007-10-25 16:55   ` Eric W. Biederman
2007-10-25 16:56     ` Arjan van de Ven
2007-10-25 17:05       ` H. Peter Anvin
2007-10-25 17:39         ` Eric W. Biederman
2007-10-25 17:51           ` H. Peter Anvin
2007-10-25 18:04             ` Eric W. Biederman
2007-10-25 20:36               ` H. Peter Anvin
2007-10-25 22:20                 ` Eric W. Biederman
2007-10-25 22:29                   ` H. Peter Anvin
2007-10-26  2:31                     ` Huang, Ying
2007-10-26  2:14                 ` Huang, Ying
2007-10-25 17:06       ` Eric W. Biederman
2007-10-26  1:28         ` Huang, Ying
2007-10-25 17:06     ` Andi Kleen
2007-10-25 17:08       ` H. Peter Anvin
2007-10-25 17:30         ` Eric W. Biederman
2007-10-26  2:12           ` Huang, Ying
2007-10-26  1:03   ` Huang, Ying
2007-10-26  8:48     ` Thomas Gleixner
2007-10-26  9:30       ` Huang, Ying
2007-10-26 10:20         ` Thomas Gleixner
2007-10-26 11:37       ` Andi Kleen
2007-10-26 11:31     ` Alan Cox
2007-10-26 17:00       ` H. Peter Anvin
2007-10-29  1:05       ` Huang, Ying
2007-10-26  3:36   ` Huang, Ying
2007-10-26  4:11     ` H. Peter Anvin
2007-10-25 17:01 ` Eric W. Biederman [this message]
2007-10-26  1:17   ` Huang, Ying

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=m1myu75drx.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mouli@linux.intel.com \
    --cc=tglx@linutronix.de \
    --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

all inboxes | Powered by JetHome®