mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: "Matt Fleming" <matt.fleming@intel.com>
Cc: "Vasco Dias" <rafa.vasco@gmail.com>,
	"Matthew Garrett" <mjg@redhat.com>, <linux-efi@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <cJ-ko@zougloub.eu>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] x86, efi: 1:1 pagetable mapping for virtual EFI calls
Date: Fri, 07 Sep 2012 08:43:55 +0100	[thread overview]
Message-ID: <5049C1DB020000780009998F@nat28.tlf.novell.com> (raw)
In-Reply-To: <1346946465.4244.107.camel@mfleming-mobl1.ger.corp.intel.com>

>>> On 06.09.12 at 17:47, Matt Fleming <matt.fleming@intel.com> wrote:
> On Thu, 2012-09-06 at 15:34 +0100, Jan Beulich wrote:
>> >>> On 06.09.12 at 15:15, Matt Fleming <matt@console-pimps.org> wrote:
>> > +
>> > +		pgd += i;
>> > +		save[i] = *pgd;
>> > +		set_pgd(pgd, efi_one_to_one_pgd[i]);
>> > +	}
>> 
>> Did you, as an alternative, consider switching to a different
>> CR3 instead of copying back and forth?
> 
> I did consider it, but I couldn't convince myself whether or not the EFI
> pagetable would need to be manually kept in sync with any other
> pagetables. But now I look at the code a bit harder, it seems that
> should be taken care of automatically. In fact, the tboot code seems to
> do something similar. I'll try that approach.

Actually, I think the copying approach is even broken - what if
multiple threads currently on the same address space want to
invoke a runtime call simultaneously? The first one to get here
would save the right values, but the second one wouldn't.

Jan


  parent reply	other threads:[~2012-09-07  7:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-06 13:15 Matt Fleming
2012-09-06 14:34 ` Jan Beulich
2012-09-06 15:47   ` Matt Fleming
2012-09-06 17:07     ` H. Peter Anvin
2012-09-07  7:40       ` Jan Beulich
2012-09-07  8:02         ` Matt Fleming
2012-09-07  7:20     ` Jan Beulich
2012-09-07  7:43     ` Jan Beulich [this message]
2012-09-07  8:06       ` Matt Fleming

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=5049C1DB020000780009998F@nat28.tlf.novell.com \
    --to=jbeulich@suse.com \
    --cc=cJ-ko@zougloub.eu \
    --cc=hpa@zytor.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=mjg@redhat.com \
    --cc=rafa.vasco@gmail.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®