[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v15 12/14] x86/hvm: Drop the use of save functions
This patch drops the use of save functions in hvm_save. Signed-off-by: Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx> --- xen/arch/x86/hvm/save.c | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/xen/arch/x86/hvm/save.c b/xen/arch/x86/hvm/save.c index 61565fe..363695c 100644 --- a/xen/arch/x86/hvm/save.c +++ b/xen/arch/x86/hvm/save.c @@ -195,8 +195,7 @@ int hvm_save(struct domain *d, hvm_domain_context_t *h) char *c; struct hvm_save_header hdr; struct hvm_save_end end; - hvm_save_handler handler; - hvm_save_vcpu_handler save_one_handler; + hvm_save_vcpu_handler handler; unsigned int i; int rc; struct vcpu *v; @@ -226,15 +225,14 @@ int hvm_save(struct domain *d, hvm_domain_context_t *h) /* Save all available kinds of state */ for ( i = 0; i <= HVM_SAVE_CODE_MAX; i++ ) { - handler = hvm_sr_handlers[i].save; - save_one_handler = hvm_sr_handlers[i].save_one; - if ( save_one_handler != NULL ) + handler = hvm_sr_handlers[i].save_one; + if ( handler != NULL ) { for_each_vcpu ( d, v ) { printk(XENLOG_G_INFO "HVM %pv save: %s\n", v, hvm_sr_handlers[i].name); - rc = save_one_handler(v, h); + rc = handler(v, h); if( rc != 0 ) { @@ -245,21 +243,6 @@ int hvm_save(struct domain *d, hvm_domain_context_t *h) } } } - else if ( handler != NULL ) - { - printk(XENLOG_G_INFO "HVM%d save: %s\n", - d->domain_id, hvm_sr_handlers[i].name); - - rc = handler(d, h); - - if( rc != 0 ) - { - printk(XENLOG_G_ERR - "HVM%d save: failed to save type %"PRIu16"\n", - d->domain_id, i); - return -EFAULT; - } - } } /* Save an end-of-file marker */ -- 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |