From: Qing He <qing.he@intel.com>
To: Christoph Egger <Christoph.Egger@amd.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: Fwd: [PATCH 0/18] Nested Virtualization: Overview
Date: Fri, 16 Apr 2010 17:07:08 +0800 [thread overview]
Message-ID: <20100416090708.GA4224@ub-qhe2> (raw)
In-Reply-To: <201004151520.31527.Christoph.Egger@amd.com>
On Thu, 2010-04-15 at 21:20 +0800, Christoph Egger wrote:
> This patch series brings Nested Virtualization to Xen.
> I have attached two documents Nested_Virtualization.pdf and XenNestedHVM.pdf.
>
This code is NOT generic and doesn't fit for vmx, although it is placed in hvm
directory.
For example, the structure v->arch.hvm_vcpu.nestedhvm is filled with
svm specific registers and concepts, so is the arch/x86/hvm/nestedhvm.c,
this file even includes vmcb_struct, as well as things like cpuids and efer.
A vmx adaption to this nestedhvm would be way too difficult if not impossible.
These files should go to arch/x86/hvm/svm instead since they are really svm
specific, so is the struct nestedhvm, v->arch.hvm_svm fits better.
In fact, I even doubt whether a generic nested arch should be made for vmx
and svm. When the HVM abstraction was made, it was largely because the targets
are the same, the x86 VM. However, the emulation target of nested virtualization
is either vmx or svm, which have much more differences, including
the capability reporting, the access of control structures, control registers,
interrupt delivery (idt vectoring), optimization options, guest format of hap
and etc.
Not much is common except the similarity of control flow (which is
not abstracted even in HVM: vmx_do_resume and svm_do_resume). Given the
complexity of the two HVM extensions, an abstraction may create more
overhead and quirkness than benefit.
Moreover, a l2 guest is not context complete by itself, some of it logically
belongs to l1 guest. This makes things more complicated that VMExit handling
is interlaced. I notice that the patchset uses a separate flow path other than
hvm/{vmx,svm}/entry.S, this means, for at least vmx side, many things already
there need to be duplicated to the new path, this is both error prone and makes
maintenance more difficult.
I have a nested vmx implementation in hand that supports major features
(shadow-on-shadow, shadow and ept on ept, x86_64, smp), however, several weeks
are still needed for some additional cleanup before I can send it to the list
for RFC. The patch, in contrast, lies almost fully in arch/x86/hvm/vmx,
and only adds two memebers to v->arch.hvm_vcpu, nesting_avail and in_nesting.
Thanks,
Qing
next prev parent reply other threads:[~2010-04-16 9:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-15 13:20 Fwd: [PATCH 0/18] Nested Virtualization: Overview Christoph Egger
2010-04-15 13:39 ` Vincent Hanquez
2010-04-15 14:50 ` Christoph Egger
2010-04-15 14:51 ` Christoph Egger
2010-04-15 14:57 ` Keir Fraser
2010-04-15 15:17 ` Christoph Egger
2010-04-15 16:26 ` Keir Fraser
2010-04-15 15:25 ` Tim Deegan
2010-04-16 10:01 ` Christoph Egger
2010-04-16 9:07 ` Qing He [this message]
2010-04-16 9:32 ` Christoph Egger
2010-04-16 10:27 ` Tim Deegan
2010-04-16 17:50 ` Keir Fraser
2010-04-20 2:07 ` Dong, Eddie
2010-04-17 11:43 ` Joerg Roedel
2010-04-18 17:52 ` Keir Fraser
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=20100416090708.GA4224@ub-qhe2 \
--to=qing.he@intel.com \
--cc=Christoph.Egger@amd.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).