[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v1] vmx: set 'SN' bit for the runstate transition from blocked to runnable



On April 13, 2017 3:35 AM, Chao Gao wrote:
>On Thu, Apr 13, 2017 at 02:20:23AM +0000, Xuquan (Quan Xu) wrote:
>>From 946e7589e5a875574c7567a91943d47c38218a6f Mon Sep 17
>00:00:00 2001
>>From: Quan Xu <xuquan8@xxxxxxxxxx>
>>Date: Fri, 14 Apr 2017 02:11:30 +0800
>>Subject: [PATCH v1] vmx: set 'SN' bit for the runstate transition from
>>blocked  to runnable
>>
>>set 'SN' bit of posted-interrupt descriptor when the runstate
>>transition is from blocked to runnable (SN bit of posted-interrupt
>>descriptor is still set to a blocked vCPU), otherwise PI notification
>>event may be sent to a
>
>Currently, we clear 'SN' bit for a blocked vCPU in order to receive a wakeup
>interrupt to wake up the blocked vCPU. Also note that wakeup interrupt is not
>a special vector for CPU.
>
Sorry, a typo 's/set/clear/'.... 
You are right. It is clear. that's why I want to set it.


>>non-running vCPU.
>>
>>Signed-off-by: Quan Xu <xuquan8@xxxxxxxxxx>
>>---
>> xen/arch/x86/hvm/vmx/vmx.c | 3 ---
>> 1 file changed, 3 deletions(-)
>>
>>diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
>>index 9c5a388..956f104 100644
>>--- a/xen/arch/x86/hvm/vmx/vmx.c
>>+++ b/xen/arch/x86/hvm/vmx/vmx.c
>>@@ -142,9 +142,6 @@ static void vmx_pi_switch_from(struct vcpu *v)  {
>>     struct pi_desc *pi_desc = &v->arch.hvm_vmx.pi_desc;
>>
>>-    if ( test_bit(_VPF_blocked, &v->pause_flags) )
>>-        return;
>>-
>
>I wander whether vmx_pi_switch_from() will be called in the transition
>blocked -> runnable.
>In my mind, the function is called during context switch and consumes the
>vcpu that is to be blocked or runnable. 

If you are right, my patch is wrong.. 

Chao, thank you. I will check it again..

Quan

>I think this if() statement is to
>distinguish 'block' case and doesn't set 'SN' for this case.
>





>Thanks
>Chao
>
>>     pi_set_sn(pi_desc);
>> }
>>
>>--
>>1.8.3.1
>
>
>>_______________________________________________
>>Xen-devel mailing list
>>Xen-devel@xxxxxxxxxxxxx
>>https://lists.xen.org/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.