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] Pin vcpu for VMX domain

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] Pin vcpu for VMX domain
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Thu, 9 Feb 2006 16:46:47 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 09 Feb 2006 08:58:23 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcYswYlmftZeBTNKSVikHmtHuXM0LQAkBPKg
Thread-topic: [Xen-devel] [PATCH] Pin vcpu for VMX domain
 Hi, Keir
        Attached is updated patch. It use migrate_timer() function and
do __vmpclear on arcj_vmx_do_resume.
        There is still one corner case. Currently the PIT timer is
initialized on pit_hook. So when migrate the timer, it maybe possible
that the pit timer is still not initialized. However, this situation may
happen also on vmx_relinquish_resources. So we plat to provide a patch
to init the pit timer on hvm_setup_platform, which is called from
vmx_do_launch.

Thanks
Yunhong Jiang

>-----Original Message-----
>From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
>[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Keir Fraser
>Sent: Wednesday, February 08, 2006 11:14 PM
>To: Jiang, Yunhong
>Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
>Subject: Re: [Xen-devel] [PATCH] Pin vcpu for VMX domain
>
>
>On 8 Feb 2006, at 12:58, Jiang, Yunhong wrote:
>
>> I'm not sure if it will has some corner case, and hope your
>> clarification for it.
>> considering following situation, assume the VMX switch from 
>cpu 0->cpu1
>> 1) on cpu0, the timer interrupt happened, so timer_softirq_action is
>> called, the pit_timer_fn is called, and in pit_timer_fn, it 
>will try to
>> set the  pit timer again.
>> 2) before pit_timer_fn set the pit timer on cpu0, the stop_timer is
>> called on cpu1 on vmx_reinstall_timers.
>> 3) after stop_timer finished, the pit_timer_fn on cpu0 set 
>the ac_timer
>> on cpu0.
>>
>> on this situation, the stop_timer on cpu1 will has no 
>effect. And then
>> the init_timer may cause error situation.
>>
>> In fact, I think the old patch itself is not safe on this situation,
>> since the stop_timer is called on IPI interrupt , which may run when 
>> the
>> pit_timer_fn is running.
>
>Good point. I'll have to add a migrate_timer() function I think, that 
>does the migration atomically.
>That'll save you the hassle of stop/init/reactivate as well.
>
>  -- Keir
>
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@xxxxxxxxxxxxxxxxxxx
>http://lists.xensource.com/xen-devel
>

Attachment: vcpu-pin-8793.patch
Description: vcpu-pin-8793.patch

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