From: Andi Kleen <ak@muc.de>
To: virtualization@lists.osdl.org
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
Andrew Morton <akpm@osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Chris Wright <chrisw@sous-sol.org>
Subject: Re: [PATCH 1/4] x86 paravirt_ops: create no_paravirt.h for native ops
Date: Mon, 7 Aug 2006 08:02:40 +0200 [thread overview]
Message-ID: <200608070802.40614.ak@muc.de> (raw)
In-Reply-To: <44D6D315.2030907@goop.org>
On Monday 07 August 2006 07:43, Jeremy Fitzhardinge wrote:
> Andi Kleen wrote:
> >> +/* Stop speculative execution */
> >> +static inline void sync_core(void)
> >> +{
> >> + unsigned int eax = 1, ebx, ecx, edx;
> >> + __cpuid(&eax, &ebx, &ecx, &edx);
> >> +}
> >>
> >
> > Actually I don't think this one should be para virtualized at all.
> > I don't see any reason at all why a hypervisor should trap it and it
> > is very time critical. I would recommend you move it back into the
> > normal files without hooks.
> >
>
> When VT/AMDV is enabled, cpuid could cause a vm exit,
They will learn to add a filter at some point I guess (at least on SVM
because it's not patched out on AMD)
> so it would be
> nice to use one of the other serializing instructions in this case.
You would first need to find one that works in ring 3. On x86-64 it is
used in the gettimeoday vsyscall in ring 3 to synchronize the TSC and
afaik John was about to implement that for i386 too.
BTW another issue that I haven't checked but we will need to make
this also an alternative() for another case - it is faily important
to patch it out on Intel systems with a synchronized TSC where it is
fairly expensive. That is also not done yet on i386, but will be
likely once vsyscall gettimeofday is implemented.
So basically you would need double patching. Ugly.
I would recommend to keep it out of para ops.
-Andi
next prev parent reply other threads:[~2006-08-07 6:02 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-07 4:43 [PATCH 1/4] x86 paravirt_ops: create no_paravirt.h for native ops Rusty Russell
2006-08-07 4:45 ` [PATCH 2/4] x86 paravirt_ops: paravirt_desc.h for native descriptor ops Rusty Russell
2006-08-07 4:47 ` [PATCH 3/4] x86 paravirt_ops: implementation of paravirt_ops Rusty Russell
2006-08-07 4:48 ` [PATCH 4/4] x86 paravirt_ops: binary patching infrastructure Rusty Russell
2006-08-07 5:14 ` Rusty Russell
2006-08-07 5:38 ` Andi Kleen
2006-08-07 5:56 ` Jeremy Fitzhardinge
2006-08-07 5:39 ` [PATCH 3/4] x86 paravirt_ops: implementation of paravirt_ops Andi Kleen
2006-08-07 5:56 ` Jeremy Fitzhardinge
2006-08-07 6:13 ` Rusty Russell
2006-08-07 6:20 ` Andi Kleen
2006-08-07 7:27 ` Rusty Russell
2006-08-07 5:40 ` [PATCH 2/4] x86 paravirt_ops: paravirt_desc.h for native descriptor ops Andi Kleen
2006-08-07 7:50 ` Rusty Russell
2006-08-07 8:53 ` Andi Kleen
2006-08-07 17:19 ` Dave Jones
2006-08-07 5:22 ` [PATCH 1/4] x86 paravirt_ops: create no_paravirt.h for native ops Jeremy Fitzhardinge
2006-08-07 5:30 ` Andi Kleen
2006-08-07 5:43 ` Jeremy Fitzhardinge
2006-08-07 6:02 ` Andi Kleen [this message]
2006-08-07 6:23 ` Jeremy Fitzhardinge
2006-08-07 6:03 ` Rusty Russell
2006-08-07 6:16 ` Andi Kleen
2006-08-07 6:04 ` Rusty Russell
2006-08-07 6:17 ` Andi Kleen
2006-08-07 6:27 ` Muli Ben-Yehuda
2006-08-07 7:34 ` Jan Engelhardt
2006-08-07 8:40 ` Muli Ben-Yehuda
2006-08-07 17:54 ` Jan Engelhardt
2006-08-07 20:51 ` Zachary Amsden
2006-08-08 1:59 ` Andi Kleen
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=200608070802.40614.ak@muc.de \
--to=ak@muc.de \
--cc=akpm@osdl.org \
--cc=chrisw@sous-sol.org \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.osdl.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).