All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christoph Egger" <Christoph.Egger@amd.com>
To: xen-devel@lists.xensource.com
Cc: Gavin Maltby <Gavin.Maltby@sun.com>,
	Keir Fraser <Keir.Fraser@xensource.com>
Subject: Re: RFC: MCA/MCE concept
Date: Fri, 1 Jun 2007 11:28:17 +0200	[thread overview]
Message-ID: <200706011128.17516.Christoph.Egger@amd.com> (raw)
In-Reply-To: <907625E08839C4409CE5768403633E0B02561D9A@sefsexmb1.amd.com>

On Friday 01 June 2007 10:55:28 Petersson, Mats wrote:

[snip]

> > For short, guests with a PV MCA driver will see a certain event
> > (assuming the event mechanism will be used for the notification)
> > and guests w/o a PV MCA driver will see a "General Protection Fault".
> > Is that right?
>
> Not sure if GP fault is the right thing for non-"MCA PV driver" domains. I
> think "just killing" the domain is the right thing to do.
>
> We can't gurantee that a GP fault is actually going to "kill" the guest.
> Let's assume the code that ran on the guest was something along the lines
> of:
>
>
> int some_function(...)
> {
>    ...
>
>    try {
>       ...
>       /* Some code that does quite a lot of "random" processing that may
> cause, for example, GP fault */ ...
>    } catch(Exception e)
>    {
> 	...
> 	/* handles GP fault within the kernel code */
> 	...
>    }
> }
>
>
> Note that Windows kernel drivers are allowed to use the kernel exception
> handling, and ARE allowed to "allow" GP faults if they wish to do so.
> [Don't ask me why MS allows this, but that's the case, so we have to live
> with it].

In that case, it will die sooner or later *after* consuming the data in error.
That means, the guest continues to live for an unknown time...

> I'm not sure if Linux, Solaris, *BSD, OS/2 or other OS's will allow
> "catching" a Kernel GP fault in a non-precise fashion (I know Linux has
> exception handling for EXACT positions in the code). But since at least one
> kernel DOES allow this, we can't be sure that a GPF will destroy the guest.

When Linux and *BSD see a GPF while they are in userspace, then they kill
the process with a SIGSEGV. If they are in kernelspace, then they panic.

> Second point to note is of course that if the guest is in user-mode when
> the GPF happens, then almost all OS's will just kill the application - and
> there's absolutely no reason to believe that the application running is
> necessarily where the actual memory problem is - it may be caused by memory
> scrubbing for example.
>
> Whatever we do to the guest, it should be a "certain death", unless the
> kernel has told us "I can handle MCE's".

It is obvious that there is no absolute generic way to handle all sort of 
buggy guests. I vote for:

If DomU has a PV MCA driver use this or inject a GPF.
Multiplexing all the MSR's related to emulate MCA/MCE for the guests is much
more complex than just injecting a GPF - and slower.

Keir, what are your opinions on this thread?


Christoph

-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy

  reply	other threads:[~2007-06-01  9:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-29 15:32 RFC: MCA/MCE concept Christoph Egger
2007-05-30  7:19 ` Jan Beulich
2007-05-30  7:45   ` Christoph Egger
2007-05-30  8:49     ` Jan Beulich
2007-05-30  9:10       ` Christoph Egger
2007-05-30  9:59         ` Jan Beulich
2007-05-30 10:12           ` Christoph Egger
2007-05-30 13:50         ` Gavin Maltby
2007-05-30 15:03           ` Petersson, Mats
2007-06-01  8:11             ` Christoph Egger
2007-06-01  8:55               ` Petersson, Mats
2007-06-01  9:28                 ` Christoph Egger [this message]
2007-06-01  9:48                   ` Petersson, Mats
2007-06-01 10:57                     ` Gavin Maltby
2007-06-01 11:38                       ` Petersson, Mats
2007-06-04 16:16         ` Gavin Maltby
2007-06-06  9:28           ` Christoph Egger
2007-06-06 10:35             ` Gavin Maltby
2007-06-06 11:57               ` Christoph Egger
2007-06-06 12:25                 ` Gavin Maltby
2007-06-06 13:24                   ` Christoph Egger
2007-06-14 11:59             ` Gavin Maltby
2007-06-21  9:29               ` Christoph Egger
2007-06-21 10:15                 ` Petersson, Mats

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=200706011128.17516.Christoph.Egger@amd.com \
    --to=christoph.egger@amd.com \
    --cc=Gavin.Maltby@sun.com \
    --cc=Keir.Fraser@xensource.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.