From patchwork Mon Sep 19 05:52:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suravee Suthikulpanit X-Patchwork-Id: 9338551 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 C97A560B16 for ; Mon, 19 Sep 2016 05:56:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B60E2290D4 for ; Mon, 19 Sep 2016 05:56:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA6CB290DD; Mon, 19 Sep 2016 05:56:23 +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.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID 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 3C049290D4 for ; Mon, 19 Sep 2016 05:56:23 +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 1blrWC-0004GJ-E4; Mon, 19 Sep 2016 05:53:28 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1blrWA-0004G8-QE for xen-devel@lists.xen.org; Mon, 19 Sep 2016 05:53:26 +0000 Received: from [85.158.139.211] by server-5.bemta-5.messagelabs.com id BB/A1-30284-65D7FD75; Mon, 19 Sep 2016 05:53:26 +0000 X-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tower-206.messagelabs.com!1474264403!23841028!1 X-Originating-IP: [104.47.40.73] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 43986 invoked from network); 19 Sep 2016 05:53:24 -0000 Received: from mail-co1nam03on0073.outbound.protection.outlook.com (HELO NAM03-CO1-obe.outbound.protection.outlook.com) (104.47.40.73) by server-12.tower-206.messagelabs.com with AES256-SHA256 encrypted SMTP; 19 Sep 2016 05:53:24 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+UMrYYwELbAxVPAUdlXiqEC7RMjBrobOgJ5u5G5bhXI=; b=xaDZIgQGdHX5ZSaa1BaZRBCx2oO2gnZffw+3P1gvQxi7tk88kiikYUjo6+whv1BZEXljGFFUsmMRyOQ4ZAuySM+/R92PkJo/X+80gIFSIH3koWtaH4ZSRcGA6O+PxsHOBGKpwwujwpOgeZfJa52Flc+k5B5BVcPF8sHJ/g1scpk= Received: from localhost.localdomain (114.109.128.54) by BN6PR12MB1442.namprd12.prod.outlook.com (10.172.24.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.629.8; Mon, 19 Sep 2016 05:53:20 +0000 From: Suravee Suthikulpanit To: Date: Mon, 19 Sep 2016 00:52:42 -0500 Message-ID: <1474264368-4104-4-git-send-email-suravee.suthikulpanit@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1474264368-4104-1-git-send-email-suravee.suthikulpanit@amd.com> References: <1474264368-4104-1-git-send-email-suravee.suthikulpanit@amd.com> MIME-Version: 1.0 X-Originating-IP: [114.109.128.54] X-ClientProxiedBy: HK2PR02CA0002.apcprd02.prod.outlook.com (10.163.104.140) To BN6PR12MB1442.namprd12.prod.outlook.com (10.172.24.19) X-MS-Office365-Filtering-Correlation-Id: 9d74872e-b46a-4eea-413c-08d3e05143c7 X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1442; 2:hJ+AqmoTw6sMU2p1PPWsai3e8YTssQIcc5mnW4UJF1Q/HxzolQ6p65eIHub0Dojq4COnVX6T0KctFIlHrVdfGkdwG3gxlmUeYSa2FJIYDQq1c6zEe89aUvKzVAe0gPun8nd50VY5fZsZZEHnHQH8AlUDDdWX9Y2sz3zTR5mSoUesN9+jQov9vnYv1NdnmLlb; 3:2YJhxSxwtGDGMIlCSwOjt2hd3A59+uP3S5Rv+Nu0iAQHHC8ZFq9TEVnHka8++HMlgsVxF66OLW+239DMaJKgaFjZAFedYIfbr1T2j5uSZjD8IioZz2PCuN6CjnO5h6CA; 25:T+ZpQyqyu/GlCNRQH8zehUfwjf923ilwC0/Ql0Ioj7XtPmG3/b2ZGehJk1YrhP9Zi8J1+rMeUmnP6D1FO6mptRhGJBcA2q1DjFCJay7wg7A9vPyfve+eajLEKzQi0UcGw4lifNSxR5t6akM6+EZ9e6XdrgIMWJ07AupmsnUqU5nqtZl+MykFm710fT+nHcPNtvq4AcLBDAhvNPC56BuOgbSSdGvd1azfnOCtwxTjYCDi5vNqdQkc37hl5dPW6Ya8GbGMdE3GW2evK/Haoy+8NG0OkkKqxO2SnnJct194Qu+nKw/iglu2C237QUjwB4p24RuUzNqHDvSkhxc4Ghf4ysg17KJ25+Zcafc36COs5nxyK+h2gUX2yJQGoUdfUugwo7MljX/vzsWTEE5Uvc3VCw==; 31:qWf2IP2CvwpzSaPST42f7zk3FmRG5I7BsqQkJR3FUmY3ZwAxZBu4en+bVQppdwfd8VQ3MSQYDOHE7+woOyMcnK3Oop426pvGaTpTr+YP8T8At1cG97lUZRtwBislosKiN8PZ+8AObWSvK7Dd/rGfJUL9IKFo0Xl3NqbD1j8EVEQxq4pfDuYxhGPbed81CBaYNSbTrIoO0vXmwEhS80TmsFL2VXs46G1g6V7f/eX98Os= X-Microsoft-Antispam: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Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:BN6PR12MB1442; BCL:0; PCL:0; RULEID:; SRVR:BN6PR12MB1442; X-Forefront-PRVS: 0070A8666B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(199003)(189002)(2351001)(229853001)(5660300001)(81156014)(81166006)(33646002)(8666005)(8676002)(19580405001)(7846002)(5003940100001)(7736002)(19580395003)(77096005)(305945005)(110136003)(2950100001)(92566002)(105586002)(106356001)(101416001)(2906002)(586003)(86362001)(4326007)(6116002)(3846002)(42186005)(66066001)(97736004)(47776003)(50986999)(36756003)(76176999)(48376002)(50466002)(189998001)(68736007)(50226002)(7059030)(87944003)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1442; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR12MB1442; 23:j3jDr5XqW+aMynBD+L2+Rxqm/37oPwjzEylUS+xWL?= =?us-ascii?Q?uc/ZOWX3+vS+EsDLokc3eNYir7do1ZpoRjLrRr5yRU34dQqXqlgihjFs6zzY?= =?us-ascii?Q?6KFvbIUdF0PMvDH0UxXTEyZxPdeOwgbMohCUXs6cJmX0aGO0uc32ED11ubDp?= =?us-ascii?Q?+4pgajy4yRCnOtodi3clx70+aFH726303PDVvuxUxpR91RMPMXaSqAXdOINC?= =?us-ascii?Q?XJbNNHYPpsV7BAQO9+64sBT0GuHZH1H9x92A8pn55KITCcaRoXXMYEv3hiAZ?= =?us-ascii?Q?SDya1tjaTLfXv+fAHAoPPBIY5GSGQL1hRE/BjR7kB42FYjb8ts/ioiEaVb69?= =?us-ascii?Q?nz5eDyCAesvq8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EUgwY9Etz6FaegnQVgnGnfbVBZ8XpED7DvPXNnKdZwiHz2oBkRTnX7izMt0vPwuZLj982SJeWX7v5c/4J4G3IHl5FPpFyelfTl7hxppeemauVMm/MZAH6iQe/hVV9kYn8r2/Dg/sOk5GYLp1RaLyAhse/YCOLflyZ/RregTmEruJq+GS1BEugDZcDzNkWGaDC31HqqCD3dkggq X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2016 05:53:20.1668 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1442 Cc: andrew.cooper3@citrix.com, Suravee Suthikulpanit , jbeulich@suse.com, sherry.hurwitz@amd.com Subject: [Xen-devel] [RFC PATCH 3/9] x86/HVM: Call vlapic_destroy after vcpu_destroy 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 Since vlapic_init() is called before vcpu_initialise(). We should also follow the same order here. Signed-off-by: Suravee Suthikulpanit Reviewed-by: Konrad Rzeszutek Wilk --- xen/arch/x86/hvm/hvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 7bad845..fb5bf6c 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -1606,10 +1606,10 @@ void hvm_vcpu_destroy(struct vcpu *v) tasklet_kill(&v->arch.hvm_vcpu.assert_evtchn_irq_tasklet); hvm_vcpu_cacheattr_destroy(v); + hvm_funcs.vcpu_destroy(v); + if ( is_hvm_vcpu(v) ) vlapic_destroy(v); - - hvm_funcs.vcpu_destroy(v); } void hvm_vcpu_down(struct vcpu *v)