File 616d66bd-x86-HVM-cleanup-after-failed-viridian_vcpu_init.patch of Package xen.23269

# Commit 66675056c6e59b8a8b651a29ef53c63e9e04f58d
# Date 2021-10-18 14:21:17 +0200
# Author Jan Beulich <jbeulich@suse.com>
# Committer Jan Beulich <jbeulich@suse.com>
x86/HVM: correct cleanup after failed viridian_vcpu_init()

This happens after nestedhvm_vcpu_initialise(), so its effects also need
to be undone.

Fixes: 40a4a9d72d16 ("viridian: add init hooks")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -1549,7 +1549,7 @@ int hvm_vcpu_initialise(struct vcpu *v)
 
     rc = viridian_vcpu_init(v);
     if ( rc )
-        goto fail5;
+        goto fail6;
 
     rc = hvm_all_ioreq_servers_add_vcpu(d, v);
     if ( rc != 0 )
openSUSE Build Service is sponsored by