From patchwork Thu Apr 13 02:20:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xuquan (Euler)" X-Patchwork-Id: 9678621 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 452BD60385 for ; Thu, 13 Apr 2017 02:23:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 376572862A for ; Thu, 13 Apr 2017 02:23:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C0442863B; Thu, 13 Apr 2017 02:23:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A64FA2862A for ; Thu, 13 Apr 2017 02:23:14 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cyUNH-0007TW-6o; Thu, 13 Apr 2017 02:20:43 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cyUNF-0007TQ-Jm for xen-devel@lists.xen.org; Thu, 13 Apr 2017 02:20:41 +0000 Received: from [85.158.137.68] by server-6.bemta-3.messagelabs.com id 8C/35-03428-870EEE85; Thu, 13 Apr 2017 02:20:40 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLKsWRWlGSWpSXmKPExsWi+/PKXt3yB+8 iDG6/MbdY8nExiwOjx9Hdv5kCGKNYM/OS8isSWDO+3fjBXDBHouLEm4ssDYzHxboYuTiEBM4w Siw83cMM4axnlHhwuIeli5GTg01AV2L76VOsILaIgLnE1iVbGEFsZoFTQB075EBsYYEYie7FD 9khahIlpvevZYKw9SR+d/aD2SwCqhL35swEmsPBwSsQLHGmPxckzCggJvH91BomiJHiEnOnzQ JbJSEgIvHw4mk2CFtM4t+uh1C2osSevg+sEPUZEncvvgI7h1dAUOLkzCcsEDWSEgdX3ICyzzN KnJ9WCWGbSky+eZ51AqPILCTrZiEZNQvJKIi4jsSC3Z/YIGxtiWULXzPPAvqAWSBfYkl3IIQZ IjH1PFAnF5B5m1HiZcNhRohyRYkp3Q/ZFzByrmLUKE4tKkst0jU00EsqykzPKMlNzMwB8oz1c lOLixPTU3MSk4r1kvNzNzECo7GegYFxB+O2LudDjJIcTEqivJcV3kYI8SXlp1RmJBZnxBeV5q QWH2KU4eBQkuDVuP8uQkiwKDU9tSItMweYFmDSEhw8SiK8zfeA0rzFBYm5xZnpEKlTjIpS4hB 9AiCJjNI8uDZYKrrEKCslzMvIwMAgxFOQWpSbWYIq/4pRnINRSZg3D2QKT2ZeCdz0V0CLmYAW r937FmRxSSJCSqqB0Vx8v9HaY99ORAYvYDWIXcTCty3DdfnWzsmGDFuUeWtaPQ1uN9iIN5bL/ rtcb3fRbQpX0oHlk8851nWGnuhR2Df/3x3N75NbuBUm3Zu7oOdK3r1T9gtebmNQ0mYXz88w7G moeDTddE3XvxXuv94+Dew1YeWO1f6+zO+V7Ze1v7YeMboo9eKtiBJLcUaioRZzUXEiAOsgFwl AAwAA X-Env-Sender: xuquan8@huawei.com X-Msg-Ref: server-8.tower-31.messagelabs.com!1492050036!95632655!1 X-Originating-IP: [45.249.212.189] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.12; banners=-,-,- X-VirusChecked: Checked Received: (qmail 57187 invoked from network); 13 Apr 2017 02:20:39 -0000 Received: from szxga03-in.huawei.com (HELO dggrg03-dlp.huawei.com) (45.249.212.189) by server-8.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 13 Apr 2017 02:20:39 -0000 Received: from 172.30.72.56 (EHLO SZXEMI402-HUB.china.huawei.com) ([172.30.72.56]) by dggrg03-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id ALP73922; Thu, 13 Apr 2017 10:20:32 +0800 (CST) Received: from SZXEMI506-MBX.china.huawei.com ([169.254.5.77]) by SZXEMI402-HUB.china.huawei.com ([10.83.65.54]) with mapi id 14.03.0235.001; Thu, 13 Apr 2017 10:20:24 +0800 From: "Xuquan (Quan Xu)" To: "xen-devel@lists.xen.org" Thread-Topic: [PATCH v1] vmx: set 'SN' bit for the runstate transition from blocked to runnable Thread-Index: AdKz/HtRtFj3QQtRQIq2PEtyYKfJmw== Date: Thu, 13 Apr 2017 02:20:23 +0000 Message-ID: Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [10.142.69.246] MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.58EEE071.002E, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=169.254.5.77, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 1580ba5e747684b805718694b077dd37 Cc: Andrew Cooper , Kevin Tian , Jun Nakajima , Jan Beulich , Chao Gao Subject: [Xen-devel] [PATCH v1] vmx: set 'SN' bit for the runstate transition from blocked to runnable X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP From 946e7589e5a875574c7567a91943d47c38218a6f Mon Sep 17 00:00:00 2001 From: Quan Xu 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 non-running vCPU. Signed-off-by: Quan Xu --- xen/arch/x86/hvm/vmx/vmx.c | 3 --- 1 file changed, 3 deletions(-) -- 1.8.3.1 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; - pi_set_sn(pi_desc); }