From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zachary Amsden Subject: Re: Nested SVM and migration Date: Mon, 22 Feb 2010 06:39:57 -1000 Message-ID: <4B82B35D.6010206@redhat.com> References: <4B80347E.7000003@redhat.com> <20100220201822.GG20833@8bytes.org> <4B806FB9.20009@redhat.com> <20100221121008.GI20833@8bytes.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Joerg Roedel , Avi Kivity , kvm To: Joerg Roedel Return-path: Received: from mx1.redhat.com ([209.132.183.28]:43258 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751126Ab0BVQkD (ORCPT ); Mon, 22 Feb 2010 11:40:03 -0500 In-Reply-To: <20100221121008.GI20833@8bytes.org> Sender: kvm-owner@vger.kernel.org List-ID: On 02/21/2010 02:10 AM, 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 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. > How is this a lot? The guest may have multiple gigabytes of memory and potentially terabytes of storage. An additional 4-8k of control state is not a lot. > >> 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 ;-) > There are places in MSR space that can easily be set aside for this, in fact, I think already are being used by Hyper-V. And further, even if it is used by real hardware, how does it matter? These MSRs are to be used by control software to import / export data to the virtual CPU. When being accessed by hardware virtualization, they can be re-aliased to any meaning at all, so there is no collision. Zach