From: Avi Kivity <avi@redhat.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: Zachary Amsden <zamsden@redhat.com>,
Joerg Roedel <joerg.roedel@amd.com>, kvm <kvm@vger.kernel.org>
Subject: Re: Nested SVM and migration
Date: Sun, 21 Feb 2010 14:54:01 +0200 [thread overview]
Message-ID: <4B812CE9.2070107@redhat.com> (raw)
In-Reply-To: <20100221124141.GA26465@8bytes.org>
On 02/21/2010 02:41 PM, Joerg Roedel wrote:
> On Sun, Feb 21, 2010 at 02:24:02PM +0200, Avi Kivity wrote:
>
>> On 02/21/2010 02:10 PM, Joerg Roedel wrote:
>>
>>> On Sat, Feb 20, 2010 at 01:26:49PM -1000, Zachary Amsden wrote:
>>>
>>>
>>>> The infrastructure is already there to import / export and migrate MSR
>>>> settings. MSRs are also 64-bit, and hold "model-specific" settings, so
>>>> if you don't mind thinking of the nested feature as a model-specific
>>>> feature of the KVM-SVM CPU, it's even somewhat well defined in terms of
>>>> the architecture.
>>>>
>>>>
>>> There is a lot of additional state to migrate if the vcpu is running
>>> nested. To be architecturally correct you need to transfer 6kb of data
>>> through MSRs only for the msr permission bitmap.
>>>
>> The msr permission bitmap is in guest memory, so it is already migrated.
>>
> This will work almost always but its not architecturally correct
> because the memory contents may have changed since the last vmrun
> instruction. On the other hand we already have this problem with the
> current nested msr intercept handling...
>
So, if some other cpu (or the guest itself, with appropriate
permissions) modifies the msr permission bitmap, svm will not notice
this? svm loads the bitmap during entry?
>>> The rest comes down to
>>> the nested intercept masks
>>>
>> These are in the vmcb, which is in guest memory.
>>
> Same as with the MSR permission map here.
>
>
Yes (as with the msr permission bitmap pointers).
>>> It is doable but I still think its
>>> complicated to get this right. The simplest approach would be to
>>> disallow migration when the vcpu is running in guest mode.
>>>
>>>
>> Agree, though I dislike the need to introduce a "force vmexit" ioctl.
>>
> Yes, this has possible issues too. If we reconstruct the nested state from
> the nested vmcb there is not much state left which needs migration. But
> we should keep in mind that this is not how real hardware works.
>
I don't think you can tell, unless the host cpu modifying the vmcb is
synchronized with the guest (or the guest modifies its own vmcb). But
this is all academic.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2010-02-21 12:54 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-20 19:14 Nested SVM and migration Zachary Amsden
2010-02-20 20:18 ` Joerg Roedel
2010-02-20 23:26 ` Zachary Amsden
2010-02-21 12:10 ` Joerg Roedel
2010-02-21 12:24 ` Avi Kivity
2010-02-21 12:41 ` Joerg Roedel
2010-02-21 12:54 ` Avi Kivity [this message]
2010-02-21 13:09 ` Joerg Roedel
2010-02-21 13:14 ` Avi Kivity
[not found] ` <4B8137E7.4030001@redhat.com>
[not found] ` <20100221144352.GC26465@8bytes.org>
2010-02-22 16:54 ` Zachary Amsden
[not found] ` <4B814C41.7010105@redhat.com>
[not found] ` <20100221155624.GD26465@8bytes.org>
2010-02-22 16:56 ` Zachary Amsden
2010-02-22 16:59 ` Avi Kivity
2010-02-22 16:46 ` Zachary Amsden
2010-02-22 17:07 ` Joerg Roedel
2010-02-24 15:23 ` Joerg Roedel
2010-02-24 20:21 ` Zachary Amsden
2010-02-22 16:42 ` Zachary Amsden
2010-02-22 16:44 ` Avi Kivity
2010-02-22 17:00 ` Zachary Amsden
2010-02-22 17:02 ` Avi Kivity
2010-02-22 17:07 ` Zachary Amsden
2010-02-22 17:11 ` Avi Kivity
2010-02-22 17:24 ` Zachary Amsden
2010-02-22 16:39 ` Zachary Amsden
2010-02-21 7:23 ` Avi Kivity
2010-02-21 7:46 ` Gleb Natapov
2010-02-21 8:12 ` Avi Kivity
2010-02-21 12:18 ` Joerg Roedel
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=4B812CE9.2070107@redhat.com \
--to=avi@redhat.com \
--cc=joerg.roedel@amd.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=zamsden@redhat.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