From: Keir Fraser <keir.fraser@eu.citrix.com>
To: Ian Campbell <Ian.Campbell@eu.citrix.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Cc: Jan Beulich <JBeulich@novell.com>
Subject: Re: Re: [PATCH] switch to a known good/static GDT before kexec
Date: Thu, 02 Jul 2009 12:11:40 +0100 [thread overview]
Message-ID: <C672547C.884C%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <C672500B.8846%keir.fraser@eu.citrix.com>
On 02/07/2009 11:52, "Keir Fraser" <keir.fraser@eu.citrix.com> wrote:
> Thinking about this raises another question. Since your patch to allow
> arbitrary numbers of VCPUs per domain, does the GDT logic in
> __context_switch() work any more? What if you have a next vcpu n for which
> !need_full_gdt(n) but where its domain does not have a vcpu_id as large as
> p->vcpu_id? Won't you end up with a GDTR pointing at a non-existent mapping
> ('off the end' of n->domain's per-domain mappings)?
Okay, having read through __context_switch() in detail with Ian Campbell, we
decided the logic there is correct. If you switch to a !need_full_gdt() vcpu
then you always switch back to the default gdt_table, so the per-domain
mappings do not matter. This also explains why kexec now needs to forcibly
lgdt -- when it forcibly switches back to idle_pg_table the per-domain
mappings will not be there and so we fault on next segment reload.
I have one more question then -- when need_full_gdt(n), why do we always
unconditionally rewrite the l1es mapping the reserved gdt entries? Shouldn't
that be done on vcpu creation only and perhaps on compat mode switch (i.e.,
isn't it wasteful to do it in the context switch path)?
-- Keir
next prev parent reply other threads:[~2009-07-02 11:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-02 8:45 [PATCH] switch to a known good/static GDT before kexec Ian Campbell
2009-07-02 9:18 ` Keir Fraser
2009-07-02 10:52 ` Keir Fraser
2009-07-02 11:11 ` Keir Fraser [this message]
2009-07-02 11:45 ` Re: [PATCH] switch to a known good/static GDT beforekexec Jan Beulich
2009-07-02 12:38 ` Keir Fraser
2009-07-02 19:59 ` Keir Fraser
2009-07-03 7:15 ` Re: [PATCH] switch to a known good/static GDTbeforekexec Jan Beulich
2009-07-03 7:48 ` Keir Fraser
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=C672547C.884C%keir.fraser@eu.citrix.com \
--to=keir.fraser@eu.citrix.com \
--cc=Ian.Campbell@eu.citrix.com \
--cc=JBeulich@novell.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.