From patchwork Sat Dec 31 05:45:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suravee Suthikulpanit X-Patchwork-Id: 9492605 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 8517360416 for ; Sat, 31 Dec 2016 05:49:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6842422689 for ; Sat, 31 Dec 2016 05:49:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4962825250; Sat, 31 Dec 2016 05:49:39 +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 873BC22689 for ; Sat, 31 Dec 2016 05:49:38 +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 1cNCVG-00040C-6e; Sat, 31 Dec 2016 05:46:50 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cNCVF-0003zw-52 for xen-devel@lists.xen.org; Sat, 31 Dec 2016 05:46:49 +0000 Received: from [85.158.139.211] by server-13.bemta-5.messagelabs.com id C7/18-18129-84647685; Sat, 31 Dec 2016 05:46:48 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA1VSa0hTYRjed3Y7iieOU/FtTIORpdK8RaH1JzD TSLtZIUXYmR231S6yM2v9SUWrtdJEDVQkrKTbzFJQR5fhJcOJ+cNUkkxRDOcidRRJmdSOZ5r9 e773ed7ned+PF+dLloRSnDabaKOe0spF/gJ1rPy4InWfKiuueE6W2OC5L9iD0npeLmGH0UmhR q80mM8I1e62anGeQ2y2lljEheiFyIr8cQFZwofW9jvIivxwRGbD3ES9kCUkZBEGk9fvYiwhIn eDu25MzOJgMgxs1joxK+KTNzBw2Gb4LBFE7oeJK21eJ9xrGwFlozK2TJDpMFRWvRIAZDg431Y KWexHZsDySP+KXOLVWL5lcvJAcNZMC1jMJwE6XS4+1yqHmrZCEYevIbA9O8diCRkN7990+uoZ MGAf4K/iD+W3V5YE8rEIfpS0YNxjUASWBauADQZSC+PDyVzDKWh1OX0NVRiMLLh8j1IRfLf/9 EXIYMI5JOSIYSE4XRYxt0I2/KpL5uqzBNRc9fjiGkWw1HcPcV8khXm704dl8Ly6TlCOImrX7V 27bu96hD1BkQxtvEAbFfFJMUqjRqU26SiNVhEftyNGRzMMpaK1lJKJyTHoWpD3EAp4PGRHU7c OdqGNOCYPIZKS6CzJBqXh7CU1xaizjflamulCMhyXA+Haq8qSBBppFW3O1Wi917RKAx4gDybC U7w0weRROkaj4qg+pMA75h99xiQCvUFPS0OJItaDZEXqfP2axepNDqIwaRCBeDyeJCCPNuo0p v95NwrFkTyI+MK6BGj0prUkt3cIzDvEFm0OO4SJ+kdJCxHsSp+udKQmpryLmk2dtGeOexpskR cb6ainUe1Tea9KO3pOnM7ttzWcR57F0csRYw+qDx3dNFQTc7M7bnNxwWJRSnnZ71lLC1aR0GV oly0nHEuzbvukGhzf2RcbYvdsl85UNh/x1DcvmpssD7t7/3w8EGL4WvU63e3Y6mmlm3or5AJG TcVH840M9Rfp4f4JjgMAAA== X-Env-Sender: Suravee.Suthikulpanit@amd.com X-Msg-Ref: server-13.tower-206.messagelabs.com!1483163202!62235236!2 X-Originating-IP: [104.47.34.85] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.1.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 21397 invoked from network); 31 Dec 2016 05:46:47 -0000 Received: from mail-by2nam01on0085.outbound.protection.outlook.com (HELO NAM01-BY2-obe.outbound.protection.outlook.com) (104.47.34.85) by server-13.tower-206.messagelabs.com with AES256-SHA256 encrypted SMTP; 31 Dec 2016 05:46:47 -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=lKuKLRLQEfotZjcPKAZRNlzOQNok4OY31ELFFpIejbE=; b=uaQECz6wp6pnm6x6NoJ2y5KvhEcBHENQEzZbE1dqrjtorG3ElbTq2eRhJNqIX7SDz819rbu7tKwUll9kW0i0vSx1HIG+ASbfVTAX6KlRQE6U8z/hatgmMGlCIKnMRHDouCXaeJqVDqrrYX3PgF9FPxO88/gj1O1vLAJGn4gFQR0= Received: from localhost.localdomain (114.109.128.54) by MWHPR12MB1453.namprd12.prod.outlook.com (10.172.55.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.789.14; Sat, 31 Dec 2016 05:46:42 +0000 From: Suravee Suthikulpanit To: Date: Fri, 30 Dec 2016 23:45:54 -0600 Message-ID: <1483163161-2402-4-git-send-email-suravee.suthikulpanit@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1483163161-2402-1-git-send-email-suravee.suthikulpanit@amd.com> References: <1483163161-2402-1-git-send-email-suravee.suthikulpanit@amd.com> MIME-Version: 1.0 X-Originating-IP: [114.109.128.54] X-ClientProxiedBy: PS1PR0601CA0058.apcprd06.prod.outlook.com (10.167.43.154) To MWHPR12MB1453.namprd12.prod.outlook.com (10.172.55.22) X-MS-Office365-Filtering-Correlation-Id: 947edb49-e46b-42bc-b9c2-08d4314067ee X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:MWHPR12MB1453; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1453; 3:Q+eCgQGqMwTRscvc+gzbzla/rQRgCNaWRRjXRA425GcqngiRyM/38dOBDfrpbz+m+WLFuquBeXcIp8GJgf/9pRBrRFJUJikbV650SVDFELoFE/kzg3IwbsxDM7fZXkVgxJPCi2Qc1BNSDLDsRGoClXBFlT+yRWLvSMSTMk4yMZs4gv7Xmr9crRnmUyxBberGydfWbP+9uYjvxYo6ZyqEiU1jHcMgv/Mavs89IKFrWuxaU7CCYC2vQTQ3WZCZV7FWXh+E9TUQIh3XyJJb3XxkgQ==; 25:5Q3ivxGubsdQEb3dnFEGm/10FiVtuEpPvQRzAupapd8h2v+s3sbwpFWZeEJkHJ4DsFC4dKxRd8IAz9aEDilx79pxYN0ZlTjKaTLIQbmFRI49upy0nxyWYAEizc4s58RWXUjhNNMl5eLAEYe5uTmEMNBPUwSplUX+6y5hSan/71B/O6PG3JiSNOuokEkJQtrReXA+dCN1DpVmSTJBtcOVlkJLbxAGvIFHGHkfUxlHmHKafOEmokRcTFMb3rSEFvQh4qPQRYTfs1Tbi3oTd++tmuMUllkj+kcZRGV8rkn9weKx/b+RdxgPSPTYzxtUc0oTRsCVpTHOs9pThJSBzWH477gP8JVFC9gocM0284mUeK/70zJvS3GJsgkR9wYofoOEHw8f2OTgyv7reotKZXm9MDl9kIzE/tkxyUUVOFQf5hGVppJKZJdQf2ilPUKN7rz4CTBk2wX0HnkyFMN+5z9D8A== X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1453; 31:gWF8Xvcv1SBpFmJId1CZMlH0c2BVPyVwEuJQlpMAOsQue+N+Vt33KunLO5iunW/FpFcqod/ZfzmUBp6kDQaRZW8xjN40qS4/2WRnVYjZ1s1FRrmp732GPrv+9yhHPlawZNbyVl9hw3SjbDR2rq6fRzb34gjW4Bmpj2G/+HJLD6Z2r/FiloTwbb7aRqFnb+OgsQE0H9QPZLCo+jG3M3ptbW939oRnhRh5+k21565ZvqvVIuy2pz2oDAx71LV+fpM1JTzK5fzNGeUIpgbQIx/rzg==; 20:TWihFxkg1Cg1qx9ZeQJD7xYLvXn2FOQDeOekzJyNjjPPbQl1jUBxZ525wE4MSidWQn8nxaRaVw+LHKGDzCjPTXI3MEYp7pYv5bDLz+7WJyfpE5gYR4c1JK+CSd98f7V42bCgOg0bDKCGqtaNUM5LBio3IdyDKKCip640k9JvmbRZPhsWQUHoBZbP4Gkzi9o6UyX/jZaUezKcpSpJo2qQZHZinEAwWoKVWPvCMuOgcUpkcoWzaMGudA7leCVCiZOOtyAaS0Uay020nVHUtUEP+nUyqqr6TMdsagNXTrhCbntl3InDsAJHlwx7HlIOxceg6i2t8+4NFJWLQgT8fGEoYco/CRdzENO3EXEUofYvMmnXUQz0QQRGQS9N0QM2K0Fk7oRXPls9qt0HJVC+jXp9DC+1hkGCf1ZaRBZ3yYLM02T5LqjDFH7mLdcnf9MpZTJfdf/OLL1g5uWm74COgDq1pp4M4ckU945TeZnZdED/MRL68i3Fz+QBFfoY8rZ5PCNI X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(146099531331640)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123560025)(20161123564025)(20161123555025)(6072148); SRVR:MWHPR12MB1453; BCL:0; PCL:0; RULEID:; SRVR:MWHPR12MB1453; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1453; 4:aNcHTEwXw5pPAOuLxo8epZ3BnYKfUPRFvifE8Lj3vTAgvnMLEJrDWkUWVlcla+eQuKi98MsOgu3JwDv9VYlMWhV7nGMMrYpkhgIexizmbIVmSYsCMQ+5JcnWPmLYjqtH/vFBhK9U+EN2+VwTftkxzce0Aw9l/GpaHJTsqGpnNtnnkqWLg5qOGtsyiXNM+Qi8ZvkgUYYKnRGHyADUv4tdBJv7jzfpORrfcir9BemPyF01Tp4bHAXDLvnxX7ms+7/C0LKP5oLCwNWuw4ZYH/la0ctyAb5pR/o+Fc1McAE5LKqDBIk8tEgK0bcbbP5IK6gRjotDG8q0RjKXXai5rDBYAmkqCO8i48ktrBcJZp0FuMRwXfE6fjz804T5wQ9/sz+BpTd+RsFu0sSBoRqE3JfxYtn2xrY3uhS2XDYk+uud77d56gOkKXY0XibPkRIDCUG2TiPhEfzmyjSZuVi8hBNyGueUeAU3aF1ExPpnesTfmQRdZnX5CLxEN7rhp0XnEri53eJ4Q7PEO5ZXbdLXInzJGTeRgbsgEOqNNYmUj32eJJZrx2EF0unto2vck8Agngg48qeiP44/9nzsm8vPJl/uZcBNNkpV2evOF3qDFgGq0TeXy1lOG7wE7lEX41qUTyA3BS9Sja56Ep9ejwnO1SaizPXnbxpQS500ytkO2bh3hzX77HVnY8cXVW6NZrGjfB5Bo2+A+/0h5Gy6NXhs9LnKlQ== X-Forefront-PRVS: 0173C6D4D5 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(39860400002)(39840400002)(39850400002)(39410400002)(39450400003)(199003)(189002)(92566002)(68736007)(4326007)(25786008)(105586002)(48376002)(50466002)(81166006)(101416001)(305945005)(110136003)(7736002)(5003940100001)(8676002)(2351001)(3846002)(36756003)(106356001)(50986999)(6116002)(8666007)(81156014)(189998001)(42186005)(2950100002)(33646002)(76176999)(97736004)(575784001)(66066001)(47776003)(54906002)(6666003)(86362001)(38730400001)(5660300001)(2906002)(6486002)(6506006)(6916009)(50226002)(6512006)(87944003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1453; 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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Ic3E04LsyhodmAkGHSypN753tIJ06fpQ1+a4atBAbu X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Dec 2016 05:46:42.7213 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1453 Cc: Kevin Tian , jbeulich@suse.com, Jun Nakajima , andrew.cooper3@citrix.com, Suravee Suthikulpanit , sherry.hurwitz@amd.com, boris.ostrovsky@oracle.com Subject: [Xen-devel] [PATCH v2 03/10] 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 call the destroy functions in the the reverse order here. Signed-off-by: Suravee Suthikulpanit Reviewed-by: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: Jun Nakajima Cc: Kevin Tian Reviewed-by: Kevin Tian . btw since it's a general --- 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 25dc759..d573f0f 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -1613,10 +1613,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)