From: Christoph Egger <Christoph.Egger@amd.com>
To: Tim Deegan <Tim.Deegan@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 07/14] Nested Virtualization: trap
Date: Tue, 10 Aug 2010 15:37:49 +0200 [thread overview]
Message-ID: <201008101537.49610.Christoph.Egger@amd.com> (raw)
In-Reply-To: <20100810125619.GF13291@whitby.uk.xensource.com>
On Tuesday 10 August 2010 14:56:19 Tim Deegan wrote:
> Hi,
>
> At 13:25 +0100 on 10 Aug (1281446710), Christoph Egger wrote:
> > > I don't see why this change is needed. AFAICS, all cases are covered
> > > by unconditionally calling hvm_inject_exception() here. *-on-hap never
> > > takes this path at all because L0 doesn't intercept #PF when it uses
> > > HAP, so the only difference this makes is to catch the case where L1
> > > didn't intercept #PF and it was injected directly into L2.
> >
> > Correct. How should L1 fix its shadow page table in this case?
> > I expect L2 to go wild because of that.
>
> L1 might not be using shadow pagetables. It might be some sort of
> cooperative microkernel allowing the L2 to do its own paging. Even in
> Xen, if we started using HVM containers for performance of 64-bit
> direct-paged guests, we might consider having guest pagefaults delivered
> straight to the guest (well, except that it would break ptwr_foo).
Ok, I didn't have such microkernels in mind.
> > > But this is an acceptable thing for the L1 to do (even though Xen
> > > doesn't ever behave that way), so I think it's wrong to crash the
> > > guest.
> >
> > Ok, that is the point where our opinions differ. Can you explain me why
> > this is acceptable? As I said above, I expect the L2 guest to go wild in
> > this case.
>
> Quite possibly, but it's (a) exactly what would happen on real hardware,
> and (b) not L0's problem if L1 misbehaves (except to protect other L1s
> from it).
I see. Ok, I will change hvm_inject_exception() back to return void.
> > > What was the reason for calling svm_inject_exception() directly in some
> > > cases?
> >
> > svm_inject_exception() always injects a #PF into running L1 or L2. It
> > never injects a VMEXIT into L1.
>
> Yes; but _why_ do we need to inject directly into L2?
Not at all. This shouldn't happen in practise. The 'goto out' should prevent
this.
The reason is, this last line also runs with nestedhvm disabled in the guest
config file. We don't want to break the non-nestedhvm case, right?
Oh, I see now: hvm_inject_exception() does the right thing for all cases.
We can just leave it there as it is in the upstream source.
Christoph
--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
next prev parent reply other threads:[~2010-08-10 13:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-05 15:02 [PATCH 07/14] Nested Virtualization: trap Christoph Egger
2010-08-09 12:44 ` Tim Deegan
2010-08-10 8:55 ` Christoph Egger
2010-08-10 10:48 ` Tim Deegan
2010-08-10 12:25 ` Christoph Egger
2010-08-10 12:56 ` Tim Deegan
2010-08-10 13:37 ` Christoph Egger [this message]
[not found] <1A42CE6F5F474C41B63392A5F80372B22A3E5B97@shsmsx501.ccr.corp.intel.com>
2010-08-19 2:44 ` Dong, Eddie
2010-08-19 8:35 ` Tim Deegan
2010-08-19 10:32 ` Christoph Egger
2010-08-19 14:12 ` Dong, Eddie
2010-08-19 13:53 ` Dong, Eddie
2010-08-19 14:30 ` Tim Deegan
2010-08-23 3:12 ` Dong, Eddie
2010-08-31 10:34 ` Tim Deegan
2010-08-23 16:03 ` Christoph Egger
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=201008101537.49610.Christoph.Egger@amd.com \
--to=christoph.egger@amd.com \
--cc=Tim.Deegan@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 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).