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

[Xen-devel] [PATCH v15 02/14] x86/hvm: Introduce hvm_save_tsc_adjust_one() func


  • To: xen-devel@xxxxxxxxxxxxx
  • From: Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>
  • Date: Fri, 3 Aug 2018 16:53:39 +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=Ghcx6+1k/0ThMAjl4OsVtMoQFOw28J2LTb6wjewsUC2/dqw5kFDC7qmSt7bew5/wp3MWkiFflE5u7QVLxfrJ304113o69xcrHsQaU/C8ptDwSPjQ61DtVDLLVJFJFecUQrEoGvExEldKeCz6dedgRCXWacC6ByjEYWpb2PWveZPmD9edgZ5I646uLO5jSBft0rHj2F1e7SObzXi8yAs/How7l7AFil7lxUKLkLY52abjXfTiKFUdHC5ojvGsYSPsOzFZr+CXy7XodEFo3SKHm6GEwuKKgIM6jFCQv9s0xIvJUR4tHFwUkZQDY0K6GLaqrROjdS9jXhjYTEXO7fUGhQ==; 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>

---
Changes since V13:
        - Moved tsc_adjust to the initializer.
---
 xen/arch/x86/hvm/hvm.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 93092d2..d90da9a 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -740,16 +740,23 @@ void hvm_domain_destroy(struct domain *d)
     destroy_vpci_mmcfg(d);
 }
 
+static int hvm_save_tsc_adjust_one(struct vcpu *v, hvm_domain_context_t *h)
+{
+    struct hvm_tsc_adjust ctxt = {
+        .tsc_adjust = v->arch.hvm_vcpu.msr_tsc_adjust,
+    };
+
+    return hvm_save_entry(TSC_ADJUST, v->vcpu_id, h, &ctxt);
+}
+
 static int hvm_save_tsc_adjust(struct domain *d, hvm_domain_context_t *h)
 {
     struct vcpu *v;
-    struct hvm_tsc_adjust ctxt;
     int err = 0;
 
     for_each_vcpu ( d, v )
     {
-        ctxt.tsc_adjust = v->arch.hvm_vcpu.msr_tsc_adjust;
-        err = hvm_save_entry(TSC_ADJUST, v->vcpu_id, h, &ctxt);
+        err = hvm_save_tsc_adjust_one(v, h);
         if ( err )
             break;
     }
-- 
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®.