xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Ross Lagerwall <ross.lagerwall@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Keir Fraser <keir@xen.org>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH] x86: Don't crash when mapping a page using EFI runtime page tables
Date: Mon, 18 May 2015 10:12:43 +0100	[thread overview]
Message-ID: <5559C92B020000780007AF6F@mail.emea.novell.com> (raw)
In-Reply-To: <1431706091-32288-1-git-send-email-ross.lagerwall@citrix.com>

>>> On 15.05.15 at 18:08, <ross.lagerwall@citrix.com> wrote:
> --- a/xen/arch/x86/domain_page.c
> +++ b/xen/arch/x86/domain_page.c
> @@ -32,20 +32,25 @@ static inline struct vcpu *mapcache_current_vcpu(void)
>          return NULL;
>  
>      /*
> +     * When using efi runtime page tables, we have the equivalent of the idle
> +     * domain's page tables but current may point at another domain's VCPU.
> +     * Return NULL as though current is not properly set up yet.
> +     */
> +    if ( efi_enabled && read_cr3() == efi_rs_page_table() )
> +        return NULL;

While I think this is an issue even without your change, it highlights
that we need to sync updates to idle_pg_table[] into efi_l4_pgtable[]
(particularly such done during memory hotplug, but I'd envision this
to be done generically in virt_to_xen_l3e()) for this to work.

Jan

  parent reply	other threads:[~2015-05-18  9:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-15 16:08 [PATCH] x86: Don't crash when mapping a page using EFI runtime page tables Ross Lagerwall
2015-05-15 17:41 ` Andrew Cooper
2015-05-18  9:02   ` Jan Beulich
2015-05-18 10:55     ` Andrew Cooper
2015-05-18  9:12 ` Jan Beulich [this message]
2015-05-18 14:58 ` Jan Beulich
2015-05-27 10:23   ` Ross Lagerwall
2015-05-27 11:59     ` Jan Beulich
2015-05-27 12:03       ` Ross Lagerwall
2015-05-27 12:17         ` Jan Beulich

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=5559C92B020000780007AF6F@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=keir@xen.org \
    --cc=ross.lagerwall@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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).