This patch is focused on moving changing hvm_save_one() to save one
typecode from one vcpu and now that the save functions get data from a
single vcpu we can pause the specific vcpu instead of the domain.
Signed-off-by: Alexandru Isaila <aisaila@bitdefender.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
!is_hvm_domain(d) )
break;
- domain_pause(d);
ret = hvm_save_one(d, domctl->u.hvmcontext_partial.type,
domctl->u.hvmcontext_partial.instance,
domctl->u.hvmcontext_partial.buffer,
&domctl->u.hvmcontext_partial.bufsz);
- domain_unpause(d);
if ( !ret )
copyback = true;
if ( !ctxt.data )
return -ENOMEM;
+ if ( hvm_sr_handlers[typecode].kind == HVMSR_PER_VCPU )
+ vcpu_pause(v);
+ else
+ domain_pause(d);
+
if ( (rv = hvm_sr_handlers[typecode].save(v, &ctxt)) != 0 )
printk(XENLOG_G_ERR "HVM%d save: failed to save type %"PRIu16" (%d)\n",
d->domain_id, typecode, rv);
}
}
+ if ( hvm_sr_handlers[typecode].kind == HVMSR_PER_VCPU )
+ vcpu_unpause(v);
+ else
+ domain_unpause(d);
+
xfree(ctxt.data);
return rv;
}