Re: Nested SVM and migration

Joerg Roedel
2010-02-21T12:10:10Z

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 rest comes down to
the nested intercept masks and some small bits like the global interrupt
flag and the nested vmcb address. 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.

> Mostly the problem is figuring out what chunk of MSR space to use.

And hoping that this MSR space is not used by real hardware in the
future ;-)

Joerg