From: Ravi Sahita Date: Wed, 29 Jul 2015 16:39:22 +0000 (-0700) Subject: x86/hvm.c: Don't tear down altp2m state if it was never set up X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~2660 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=211ce257be739447f85f17dec3a2ac604d1c8442;p=xen.git x86/hvm.c: Don't tear down altp2m state if it was never set up Reported-by: Wei Liu Signed-off-by: Ravi Sahita Reviewed-by: Andrew Cooper Tested-by: Wei Liu [ ijc -- replacement subject from Andy ] --- diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index ec1d797d5d..6a56216721 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -2463,7 +2463,9 @@ void hvm_vcpu_destroy(struct vcpu *v) { hvm_all_ioreq_servers_remove_vcpu(v->domain, v); - altp2m_vcpu_destroy(v); + if ( hvm_altp2m_supported() ) + altp2m_vcpu_destroy(v); + nestedhvm_vcpu_destroy(v); free_compat_arg_xlat(v);