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] credit scheduler issues in 64bit hypervisor

To: "Li, Xin B" <xin.b.li@xxxxxxxxx>
Subject: Re: [Xen-devel] credit scheduler issues in 64bit hypervisor
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Sun, 2 Jul 2006 08:18:12 +0100
Cc: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, "Mallick, Asit K" <asit.k.mallick@xxxxxxxxx>, "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>, Steven Hand <Steven.Hand@xxxxxxxxxxxx>, "Zheng, Jeff" <jeff.zheng@xxxxxxxxx>
Delivery-date: Sun, 02 Jul 2006 00:25:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <0EBFB99D260C5B40AC33E0F807B1AD668F72D5@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <0EBFB99D260C5B40AC33E0F807B1AD668F72D5@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 2 Jul 2006, at 05:01, Li, Xin B wrote:

This patch is itself buggy: Just because a VMCS hasn't been launched
doesn't mean it hasn't been activated on some CPU.

Hmm, thinking about a VMCS is migrating from cpu A to cpu B, and on cpu A vmclear has been executed, but just before the VMCS is launched on cpu B, the domain is killed, what will happen? I'm not sure if vmclear on a VMCS in cleared state is allowed. If not, we still need this fix.

active_cpu will be B in this case, so we'll execute VMCLEAR on CPU B. 'Launched' is just an extra sub-state of an active VMCS. This is all taken from Section 20.1 of Vol. 3 of the Intel Reference Manual.

I think the original
bug would be better fixed by only calling vmx_clear_vmcs() in
vmx_destroy_vmcs() if arch_vmx->vmcs != NULL. Even better
would be not
to allocate the VMCS so darn late.


Yes, it's buggy, and prevent the first vmclear to a vmcs.

I found even without my fix the first vmclear to a newly allocated vmcs is prevented, this is because arch_vmx->active_cpu = -1is executed before vmx_clear_vmcs(v) in construct_vmcs(). We may workaound it by setting active_cpu to smp_processor_id(), and launched to 1here, but surely this is not what we want.

Yes, that's broken. I'll fix to use __vmx_clear_vmcs().

 -- Keir


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