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 13/13] Nested Virtualization: hap-on-hap
Date: Mon, 20 Dec 2010 17:27:23 +0100 [thread overview]
Message-ID: <201012201727.23672.Christoph.Egger@amd.com> (raw)
In-Reply-To: <20101208105508.GD9912@whitby.uk.xensource.com>
On Wednesday 08 December 2010 11:55:08 Tim Deegan wrote:
> At 10:32 +0000 on 08 Dec (1291804321), Christoph Egger wrote:
> > On Wednesday 08 December 2010 11:17:15 Tim Deegan wrote:
> > > At 17:49 +0000 on 02 Dec (1291312156), Christoph Egger wrote:
> > > > > My comments on why p2m_flush_locked() isn't enough to reclaim an
> > > > > in-use p2m for recycling still stand.
> > > >
> > > > Can you point me to the mail in the ML archive you refer to, please?
> > >
> > > It's the discussion at the end of this email:
> > > http://lists.xensource.com/archives/html/xen-devel/2010-09/msg00624.htm
> > >l
> >
> > Tnx. I see it is related to your suggestion to check cr3 against -1 you
> > already mentioned.
>
> It's similar, but different. In particular, checking CR3 against -1
> may not fix it. It's possible that I'm just missing the path on vmentry
> that checks the p2m hasn't been reassigned.
My comments are based on the seventh patch series I just sent out.
The assumption is that the p2m is *empty*. So in case it is reassigned
the (v)cpu will fall out with a nested page fault since the MMU can't do
a page table walk.
>
> Quoting my two concerns from before:
> > > Is this enough? If this p2m might be in host_vmcb->h_cr3 somewhere on
> > > another vcpu, then you need to make sure that vcpu gets reset not to
> > > use it any more.
> >
> > There are three possibilities:
> > An other vcpu is in VMRUN emulation before a nestedp2m is assigned.
> > In this case, it will get a new nestedp2m as it won't find its 'old'
> > nestedp2m anymore.
> >
> > An other vcpu is in VMRUN emulation after a nestedp2m is assigned.
> > It will VMEXIT with a nested page fault.
>
> Why?
Because the p2m is empty. The MMU can not do a page table walk.
> > An other vcpu already running l2 guest.
> > It will VMEXIT with a nested page fault immediately.
>
> Hmm. It will exit for the TLB shootdown IPI, but I think you need to
> clear vcpu_nestedhvm(v).nh_p2m on the other vcpu to make sure it doesn't
> re-enter with the p2m you've just recycled.
The p2m is empty so I don't see a problem when it gets recycled.
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-12-20 16:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-12 18:45 [PATCH 13/13] Nested Virtualization: hap-on-hap Christoph Egger
2010-11-16 16:58 ` Tim Deegan
2010-12-02 17:49 ` Christoph Egger
2010-12-08 10:17 ` Tim Deegan
2010-12-08 10:32 ` Christoph Egger
2010-12-08 10:55 ` Tim Deegan
2010-12-20 16:27 ` Christoph Egger [this message]
2010-12-20 16:35 ` Tim Deegan
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=201012201727.23672.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 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.