[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v15 08/14] x86/hvm: Introduce lapic_save_hidden_one


  • To: xen-devel@xxxxxxxxxxxxx
  • From: Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>
  • Date: Fri, 3 Aug 2018 16:53:45 +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=d3tzFSXj1ut43uYVhqD/qim7OLE4XC2UbvuAmJuydIsyOAnrvkNUl3qWjyyu0MgxcL7FIODfh3U77rpAan5Oz3WO1HbWbPgpaL/zrvlbUvDge8nMhVuVWXRtQxax7TVc3Qx7iDR+7OKtp0rt0AUPZiPHJXSTecs4DEWofseGY6c4rnPrbduFUnGbwvGdi8EVI0BSzHBWxmx1gx+BxdG1qGpa4E7aGjx6ZxfpH2sHxLevl7q1FAnYqawUZDDtG9QW9i47PGVBo1bOL/IiZChfXTEabwzznyc+8ImV2P0+6XCfKc44qBOWFG5GkiVgvn2KuQstfjWdaQBgPlUxrd2cLA==; 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 is used to save data from a single instance.

Signed-off-by: Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/vlapic.c | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c
index 1b9f00a..0795161 100644
--- a/xen/arch/x86/hvm/vlapic.c
+++ b/xen/arch/x86/hvm/vlapic.c
@@ -1435,23 +1435,29 @@ static void lapic_rearm(struct vlapic *s)
     s->timer_last_update = s->pt.last_plt_gtime;
 }
 
-static int lapic_save_hidden(struct domain *d, hvm_domain_context_t *h)
+static int lapic_save_hidden_one(struct vcpu *v, hvm_domain_context_t *h)
 {
-    struct vcpu *v;
-    struct vlapic *s;
-    int rc = 0;
+    struct vlapic *s = vcpu_vlapic(v);
 
-    if ( !has_vlapic(d) )
+    if ( !has_vlapic(v->domain) )
         return 0;
 
+    return hvm_save_entry(LAPIC, v->vcpu_id, h, &s->hw);
+}
+
+static int lapic_save_hidden(struct domain *d, hvm_domain_context_t *h)
+{
+    struct vcpu *v;
+    int err = 0;
+
     for_each_vcpu ( d, v )
     {
-        s = vcpu_vlapic(v);
-        if ( (rc = hvm_save_entry(LAPIC, v->vcpu_id, h, &s->hw)) != 0 )
+        err = lapic_save_hidden_one(v, h);
+        if ( err )
             break;
     }
 
-    return rc;
+    return err;
 }
 
 static int lapic_save_regs(struct domain *d, hvm_domain_context_t *h)
-- 
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®.