From patchwork Fri Oct 28 02:37:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wu, Feng" X-Patchwork-Id: 9400987 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 DD686605EE for ; Fri, 28 Oct 2016 03:11:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA12A28D40 for ; Fri, 28 Oct 2016 03:11:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BEAEB2A4B1; Fri, 28 Oct 2016 03:11:54 +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 6073F28D40 for ; Fri, 28 Oct 2016 03:11:54 +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 1bzxXk-0006KV-Po; Fri, 28 Oct 2016 03:09:20 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzxXj-0006Jk-Mg for xen-devel@lists.xen.org; Fri, 28 Oct 2016 03:09:19 +0000 Received: from [193.109.254.147] by server-1.bemta-6.messagelabs.com id 27/28-24503-E51C2185; Fri, 28 Oct 2016 03:09:18 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJLMWRWlGSWpSXmKPExsVywNwkQjfuoFC EwZz/ihZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8aLDVUFK9gq9n/oY21gXMnaxcjJISRQKXFp 30oWEFtCgFfiyLIZrBB2gMT7n3/Zuhi5gGr6GCVWzFoElmATUJQ4ePEQmC0iIC1x7fNlRpAiZ oEFjBKNF48ygySEBUIk3h5sBCtiEVCVeNG9GyzOK+Ag0XFuBRvEBjmJDbv/M4LYnAKOEj8P3W GEuMhBYs6OV6wTGHkXMDKsYlQvTi0qSy3StdBLKspMzyjJTczM0TU0MNPLTS0uTkxPzUlMKtZ Lzs/dxAgMBgYg2ME4+7L/IUZJDiYlUd4Lk4UihPiS8lMqMxKLM+KLSnNSiw8xynBwKEnwRh0A ygkWpaanVqRl5gDDEiYtwcGjJMK7fR9Qmre4IDG3ODMdInWKUZfj3eZ3D5iEWPLy81KlxHnng cwQACnKKM2DGwGLkUuMslLCvIxARwnxFKQW5WaWoMq/YhTnYFQS5jUFmcKTmVcCt+kV0BFMQE dMTxcAOaIkESEl1cAoKLhv2twTy18fPls7+1nVusWtc8UzjwrH3KrcvivdZuL0aVVvuP3Zmc4 rx2/4vZdFyKjK/2OBalX4EqNt1xf1X+7rlqz79GO+I//RsPpAu3j+K+51ononXm095sHpMFdG 7uqBNVmHTyg+Ua1l3dXA0BYk35w7+dWfyHXqE81yGTp4pp79/OGMEktxRqKhFnNRcSIAAfe/8 IwCAAA= X-Env-Sender: feng.wu@intel.com X-Msg-Ref: server-15.tower-27.messagelabs.com!1477624155!15267201!1 X-Originating-IP: [192.55.52.88] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTkyLjU1LjUyLjg4ID0+IDM3NDcyNQ==\n X-StarScan-Received: X-StarScan-Version: 9.0.13; banners=-,-,- X-VirusChecked: Checked Received: (qmail 63239 invoked from network); 28 Oct 2016 03:09:18 -0000 Received: from mga01.intel.com (HELO mga01.intel.com) (192.55.52.88) by server-15.tower-27.messagelabs.com with DHE-RSA-CAMELLIA256-SHA encrypted SMTP; 28 Oct 2016 03:09:18 -0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 27 Oct 2016 20:09:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.31,407,1473145200"; d="scan'208"; a="1077010828" Received: from unknown (HELO feng-bdw-de-pi.bj.intel.com) ([10.238.154.53]) by fmsmga002.fm.intel.com with ESMTP; 27 Oct 2016 20:09:15 -0700 From: Feng Wu To: xen-devel@lists.xen.org Date: Fri, 28 Oct 2016 10:37:35 +0800 Message-Id: <1477622259-3476-4-git-send-email-feng.wu@intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1477622259-3476-1-git-send-email-feng.wu@intel.com> References: <1477622259-3476-1-git-send-email-feng.wu@intel.com> Cc: kevin.tian@intel.com, Feng Wu , george.dunlap@eu.citrix.com, andrew.cooper3@citrix.com, dario.faggioli@citrix.com, jbeulich@suse.com Subject: [Xen-devel] [PATCH v6 3/7] VMX: Cleanup PI per-cpu blocking list when vcpu is destroyed 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: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP We should remove the vCPU from the per-cpu blocking list if it is going to be destroyed. Signed-off-by: Feng Wu --- v6: - Use vmx_pi_unblock_vcpu() instead of vmx_pi_list_remove() v5: - Use vmx_pi_list_remove() instead of vmx_pi_list_cleanup() v4: - Call vmx_pi_list_cleanup() before vmx_destroy_vmcs() xen/arch/x86/hvm/vmx/vmx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 508be7c..eb4770c 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -338,6 +338,7 @@ static void vmx_vcpu_destroy(struct vcpu *v) * separately here. */ vmx_vcpu_disable_pml(v); + vmx_pi_unblock_vcpu(v); vmx_destroy_vmcs(v); vpmu_destroy(v); passive_domain_destroy(v);