From ffc103c223a6d12e5221f66b7e96396a61ba1b20 Mon Sep 17 00:00:00 2001 From: Suravee Suthikulpanit Date: Tue, 10 Jan 2017 08:03:02 -0600 Subject: [PATCH] x86/HVM: Fix teardown ordering in hvm_vcpu_destroy() The order of destroy function calls in hvm_vcpu_destroy() should be the reverse of init calls in hvm_vcpu_initialise(). Signed-off-by: Suravee Suthikulpanit [ Fix up tasklet_kill() position ] Reviewed-by: Andrew Cooper Reviewed-by: Jan Beulich --- 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 4c0f561947..9f74334f55 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -1626,12 +1626,12 @@ void hvm_vcpu_destroy(struct vcpu *v) free_compat_arg_xlat(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); + hvm_vcpu_cacheattr_destroy(v); } void hvm_vcpu_down(struct vcpu *v) -- 2.30.2