All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Gao <chao.gao@intel.com>
To: "Xuquan (Quan Xu)" <xuquan8@huawei.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Kevin Tian <kevin.tian@intel.com>,
	Jan Beulich <jbeulich@suse.com>,
	Jun Nakajima <jun.nakajima@intel.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v1] vmx: set 'SN' bit for the runstate transition from blocked to runnable
Date: Thu, 13 Apr 2017 03:35:11 +0800	[thread overview]
Message-ID: <20170412193511.GA1058@knl-rvp-beta.sh.intel.com> (raw)
In-Reply-To: <E0A769A898ADB6449596C41F51EF62C6B03226@SZXEMI506-MBX.china.huawei.com>

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@huawei.com>
>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.

>non-running vCPU.
>
>Signed-off-by: Quan Xu <xuquan8@huawei.com>
>---
> 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. 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@lists.xen.org
>https://lists.xen.org/xen-devel


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

  reply	other threads:[~2017-04-12 19:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-13  2:20 [PATCH v1] vmx: set 'SN' bit for the runstate transition from blocked to runnable Xuquan (Quan Xu)
2017-04-12 19:35 ` Chao Gao [this message]
2017-04-13  3:44   ` Xuquan (Quan Xu)
2017-04-13 12:35   ` Xuquan (Quan Xu)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170412193511.GA1058@knl-rvp-beta.sh.intel.com \
    --to=chao.gao@intel.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=xen-devel@lists.xen.org \
    --cc=xuquan8@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.