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

[Xen-devel] [PATCH v7 09/15] x86/hvm: Remove loop from hvm_save_tsc_adjust() func


  • To: xen-devel@xxxxxxxxxxxxx
  • From: Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>
  • Date: Thu, 7 Jun 2018 17:59:27 +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: Thu, 07 Jun 2018 14:59:48 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=b1Y4hTO4DAhH0Z6cdxKGvX7eWwGjLXEw3zd+VzVLJxpT3wj+PiqLbKiKh2uoeBQYSrHENNF/8yo8oqWH4Gakq/fVdA85gWdDbn7OFbLJhBNq0yA+RakWoNxpjIPElZOAZf0c2bRAAZfsK82pIwmmoJQBQcceebDNb7sudcv7Heq3T4YXvE93L9iGopSHCO7fcDBon0YlrKTQ93Cir3KKyXodvYWwD4H1B0kPEmD6NlUxLD0LEXR0vkUeO9JVQWHLdK62pJaprB/KBhm6X+VTkEmO/wm+H2EJI2tRBlG9hf7zTDaurElFrRPRFqoKWVDCqzsbCWF7jUX0K4i5ZPWzlw==; 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>

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

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