From: "Jan Beulich" <jbeulich@novell.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH, RFC] x86: make the GDT per-CPU
Date: Thu, 11 Sep 2008 13:35:19 +0100 [thread overview]
Message-ID: <48C92CA7.76E4.0078.0@novell.com> (raw)
In-Reply-To: <48C92AF7.76E4.0078.0@novell.com>
>>> "Jan Beulich" <jbeulich@novell.com> 11.09.08 14:28 >>>
>>> Keir Fraser <keir.fraser@eu.citrix.com> 11.09.08 12:54 >>>
>>You would need to use l1e_write_atomic() in the context-switch code, to make
>>sure all VCPU's hypervisor reserved GDT mappings are always valid. Actually
>>you must at least use l1e_write() in any case -- it is not safe to not use
>>one of those macros on a live pagetable (by which I mean possibly in use by
>>some CPU) because a direct write of a PAE pte is not atomic and can cause
>>the pte to pass through a bogus intermediate state (which could be bogusly
>>prefetched by a CPU into its TLB. Yuk!).
>
>Ah, yes. l1e_write() should be sufficient, though, as the slot(s) that get(s)
>written cannot be validly in use on any CPU (for other than speculation).
Actually, not really - on PAE, any address ever put in these slots comes
from the Xen heap, so the upper bits are always clear. But for preventing
this to be a latent bug, I'll make the change anyway.
Btw., if there was a callout from the scheduler when a vCPU gets moved
to a new CPU, it would even be possible to get this out of the context
switch path altogether I think.
Jan
next prev parent reply other threads:[~2008-09-11 12:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-10 14:35 [PATCH, RFC] x86: make the GDT per-CPU Jan Beulich
2008-09-11 10:54 ` Keir Fraser
2008-09-11 12:28 ` Jan Beulich
2008-09-11 12:35 ` Jan Beulich [this message]
2008-09-11 12:42 ` Jan Beulich
2008-09-11 13:15 ` 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=48C92CA7.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=keir.fraser@eu.citrix.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.