[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


  • To: xen-devel@xxxxxxxxxxxxx
  • From: Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>
  • Date: Fri, 3 Aug 2018 16:53:49 +0300
  • Cc: wei.liu2@xxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, ian.jackson@xxxxxxxxxxxxx, paul.durrant@xxxxxxxxxx, jbeulich@xxxxxxxx, Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Fri, 03 Aug 2018 13:54:30 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=AeMor1Jjwi2SZpWwqIFviG1CUQrVaLonwJQJ1MZvLPtidKMLrscgFUmePa+E8hvnbjfzQeSCx2lZselJ2tgWio7Wmb5r4fvuihrzUybf5pxZNw6JsKs+l1oaDd6HmK0nKrIVR5hniRzl0ihrpnB8ePFPFXDJ3WupLPuyQ3DrauPMPbEhfuFycZtRAkzmXmPNwkL+XXt3QSO0Ybqh01GTcHATNn2zpJSlcDfr+Lh4AVyj3W8OK1AVXvh7MxpVDMTqqlM5c10JOMZtNsV62Q2UTqpd+IcxMQl32eT1PvbEzsp73Wh9DXcwWYTN4G8zVOmFKnuSV3E8L40KoM646VujgA==; h=Received:Received:Received:Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References;
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.