This patch is needed in order to have a different return error for invalid vcpu
and offline vcpu on the per vcpu king.
Signed-off-by: Alexandru Isaila <aisaila@bitdefender.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
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);
- else if ( rv = -ENOENT, ctxt.cur >= sizeof(*desc) )
+ else if ( (rv = hvm_sr_handlers[typecode].kind == HVMSR_PER_VCPU ?
+ -ENODATA : -ENOENT), ctxt.cur >= sizeof(*desc) )
{
uint32_t off;