WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH][SVM] Fix 32bit Windows guest VMs save/restore

To: <wei.huang2@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH][SVM] Fix 32bit Windows guest VMs save/restore
From: Keir Fraser <keir@xxxxxxx>
Date: Mon, 31 Jan 2011 22:17:33 +0100
Cc: james.harper@xxxxxxxxxxxxxxxx
Delivery-date: Mon, 31 Jan 2011 13:19:44 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:user-agent:date:subject:from:to:cc :message-id:thread-topic:thread-index:in-reply-to:mime-version :content-type:content-transfer-encoding; bh=vWYaz/3WonKXGf5hhD6kb5d3ZDQI6vBhHJMZ13NBBa8=; b=ZTt1hFfS8T3eb56qS6+4gVYNJRZknZj9aQ0q7jnofqPUAoj3ppsvwkFk3xTAZLNYAf NPM3BVZPdVTDiclo+64dVgFhMDbdDbFD/Dkbq4AkBsAzFEtCDa9AyY/eLisGq5WzJexH AhrCv78YkjKuP0vZCWbTEspiILZDSG50EheDQ=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=jXM8JydHU7ka08+JL8P5uLbPFf8abzigh9/CtBO4kyhgmnKiCFHDcIn7/WesP+a3m8 t4WdEUBMoKuBfyJdI0Bbum3FQA6+5Zb/wYJfuQRr7TiZ5Xbli0sRTWwvJHQzyPjrDiW8 7ZanPWNQ7T0AbqiqwWP/AWIGgk/1a2OKEM87g=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C96CE488.165C9%keir@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcvBi7RQhJ+1CeXoA0aavUh0h3YWNgAAJIJK
Thread-topic: [Xen-devel] [PATCH][SVM] Fix 32bit Windows guest VMs save/restore
User-agent: Microsoft-Entourage/12.23.0.091001

On 31/01/2011 22:13, "Keir Fraser" <keir@xxxxxxx> wrote:

> This handling of the SYSENTER MSRs is overly complicated.

By the way, apart from the complexity, I suspect the current approach has
further bugs because I don't believe the canonical sysenter msr values are
correctly shuffled between the vmcb and vcpu structures when a guest moves
in and out of long mode.

Just another example why having two different canonical places for one data
item is a bad idea.

 -- Keir

> I suggest
> reverting a bunch of the original handling of cross-vendor migration as
> follows:
>  * Never intercept the SYSENTER MSRs.
>  * Remove the vcpu->arch.hvm_svm.guest_sysenter_* fields.
>  * Always hvm save/restore from/to the values in the vmcb.
>  * Modify svm_msr_read_intercept(MSR_IA32_SYSENTER_*) to svm_sync_vmcb() and
> then read the sysenter msr value from vmcb
>  * Modify svm_msr_write_intercept(MSR_IA32_SYSENTER_*) to svm_sync_vmcb(),
> then modify the sysenter msr in the vmcb, and then svm_vmload().
> 
> Result is that we get rid of some redundant fields from the vcpu structure
> and have one canonical place we always keep the sysenter msr values, in the
> vmcb. The extra cost in the msr read/write functions is totally
> inconsequential, and only used after guest migration from an Intel CPU
> anyway. Hardly something to optimise for.
> 
>  -- Keir
> 
>> 
>> 
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@xxxxxxxxxxxxxxxxxxx
>> http://lists.xensource.com/xen-devel
> 
> 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel