All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
To: Konrad Rzeszutek Wilk
	<konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: lguest-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	Jeremy Fitzhardinge <jeremy-TSDbQ3PG+2Y@public.gmane.org>,
	xen-devel-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR@public.gmane.org,
	Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	Ingo Molnar <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Subject: Re: [Xen-devel] lguest: unhandled trap 13 and CONFIG_MICROCODE_INTEL_EARLY
Date: Wed, 08 May 2013 11:07:33 -0700	[thread overview]
Message-ID: <518A9465.2020409@zytor.com> (raw)
In-Reply-To: <20130508172040.GA1256-6K5HmflnPlqSPmnEAIUT9EEOCMrvLtNR@public.gmane.org>

On 05/08/2013 10:20 AM, Konrad Rzeszutek Wilk wrote:
> 
> If I am reading you right the #1 issue is that you don't know whether
> a certain paravirt instruction has any side-effects and as such you don't
> feel that you can treat it like an equivalent instruction that is defined
> in the Intel SDM?
> 
> And that means that any development work you have in the pipeline is
> affected because you don't have the documentation on hand and are unsure
> whether you will break something?
> 

That is, indeed, the #1 issue (and you and I have discussed it at
length, obviously.)

There are a few other issues:

2. some of the paravirt_ops are plain wrong.  Most of the really big
problems are in the MMU-related ones, but as an easily-explained example
that I ran into the other day:

read_cr4_safe() assumes that there is no useful distinction between "cr4
is zero" and "cr4 doesn't exist".  Unfortunately, this is an invalid
assumption.  It would be a five-minute fix in the normal case, but since
it is paravirtualized, fixing it involves grokking the semantics of each
PV layer, including any of the hypercalls that may be involved.

In this particular example I think the answer is actually reasonable
simple, because I don't think any of the hypervisors support running on
pre-cr4 hardware (basically 486 at this point.)

3. "Let's add another hook" becomes a far too easy solution to new problems.

4. Performance and maintainability impact of having to support multiple
code flows with different semantics.  The semantics of the Xen MMU, in
particular, is actually quite different from the x86 MMU.

5. Performance and maintainability impact of a maze of twisty little
functions, all different.  For example, in the case of some of the MSR
functions, we actually end up telling the compiler to combine and break
up the two 32-bit halves into a 64-bit register multiple times, because
the functions don't actually match up.  I still don't understand why we
don't just patch out the rdmsr/wrmsr instructions, using those registers.

	-hpa

  parent reply	other threads:[~2013-05-08 18:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1367450300.11532.32.camel@x61.thuisdomein>
     [not found] ` <1367450300.11532.32.camel-uMdlDhfIn7prKue/0VVhAg@public.gmane.org>
2013-05-06  4:22   ` lguest: unhandled trap 13 and CONFIG_MICROCODE_INTEL_EARLY Rusty Russell
     [not found]     ` <87li7srb3r.fsf-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
2013-05-06 14:51       ` H. Peter Anvin
     [not found]         ` <5187C369.5020902-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2013-05-07  5:18           ` Rusty Russell
2013-05-08 17:20             ` [Lguest] " Konrad Rzeszutek Wilk
     [not found]               ` <20130508172040.GA1256-6K5HmflnPlqSPmnEAIUT9EEOCMrvLtNR@public.gmane.org>
2013-05-08 18:07                 ` H. Peter Anvin [this message]
2013-05-10 14:51                   ` Is: paravirt docs and diet. Was:Re: " Konrad Rzeszutek Wilk
     [not found]                     ` <20130510145137.GJ19520-6K5HmflnPlqSPmnEAIUT9EEOCMrvLtNR@public.gmane.org>
2013-05-10 17:19                       ` Is: paravirt docs and diet. Was:Re: [Xen-devel] " H. Peter Anvin
2013-05-10 17:53                         ` Is: paravirt docs and diet. Was:Re: [Lguest] " Matt Wilson
     [not found]                           ` <20130510175326.GD10713-reOQivfqS6pSvVcqp95Imk58d5RJRbtSwVDGBwiNqrNWk0Htik3J/w@public.gmane.org>
2013-05-10 18:07                             ` [Xen-devel] Is: paravirt docs and diet. Was:Re: " H. Peter Anvin
2013-05-13 20:11                               ` Is: paravirt docs and diet. Was:Re: [Lguest] " Konrad Rzeszutek Wilk
2013-05-09  1:43                 ` [Xen-devel] " Rusty Russell
     [not found]                   ` <8738txnd13.fsf-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
2013-05-09  3:24                     ` H. Peter Anvin
     [not found]                       ` <518B1702.7010307-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2013-05-09  8:24                         ` Paul Bolle
     [not found]             ` <87mws7nzag.fsf-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
2013-05-09  2:50               ` H. Peter Anvin

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=518A9465.2020409@zytor.com \
    --to=hpa-ymnouzjc4hwavxtiumwx3w@public.gmane.org \
    --cc=jeremy-TSDbQ3PG+2Y@public.gmane.org \
    --cc=konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=lguest-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=xen-devel-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR@public.gmane.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 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.