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

[Xen-devel] [PATCH v7 08/15] x86/cpu: Remove loop form vmce_save_vcpu_ctxt() func


  • To: xen-devel@xxxxxxxxxxxxx
  • From: Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>
  • Date: Thu, 7 Jun 2018 17:59:26 +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=thV8Dqi76jzYgoc90Qhjh4eYF/fK5ffsLxUJOgg31Eg4SEkaC5patTiNcM0JdIG6f99RXQeWHCjxyC6k1QTPpDM82mPKFeD5SXHLjUgSFaki9wNkLu6gwRNjcwk7u8vU0GZqvMyStg2GEF6syo0Uoq2J6nIX1nv2Zt7wifCuGaqM5bQbFSxvYkHTbJEYXoBQnQZKwKBI2eeW8pnZ7LfsMXkuQh8QhIvjC+bNIBd2sMO4IvWiNSGFagfhV0IUDIlFD1GsY28KNSvuxBeQwhlV5VjqH+PjNOP5yhcEUqe7ZpSPNzORJ0McveVRXn0HmEdXDWLxggV1iPq/BOw2fRGWVQ==; 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/cpu/mcheck/vmce.c | 27 +++++++--------------------
 1 file changed, 7 insertions(+), 20 deletions(-)

diff --git a/xen/arch/x86/cpu/mcheck/vmce.c b/xen/arch/x86/cpu/mcheck/vmce.c
index 404f27e..ead1f73 100644
--- a/xen/arch/x86/cpu/mcheck/vmce.c
+++ b/xen/arch/x86/cpu/mcheck/vmce.c
@@ -349,30 +349,17 @@ int vmce_wrmsr(uint32_t msr, uint64_t val)
     return ret;
 }
 
-static void vmce_save_vcpu_ctxt_one(struct vcpu *v, struct hvm_vmce_vcpu *ctxt)
-{
-    ctxt->caps = v->arch.vmce.mcg_cap;
-    ctxt->mci_ctl2_bank0 = v->arch.vmce.bank[0].mci_ctl2;
-    ctxt->mci_ctl2_bank1 = v->arch.vmce.bank[1].mci_ctl2;
-    ctxt->mcg_ext_ctl = v->arch.vmce.mcg_ext_ctl;
-}
-
 static int vmce_save_vcpu_ctxt(struct domain *d, hvm_domain_context_t *h)
 {
-    struct vcpu *v;
-    int err = 0;
-
-    for_each_vcpu ( d, v )
-    {
-        struct hvm_vmce_vcpu ctxt;
+    struct hvm_vmce_vcpu ctxt;
+    struct vcpu *v = NULL;
 
-        vmce_save_vcpu_ctxt_one(v, &ctxt);
-        err = hvm_save_entry(VMCE_VCPU, v->vcpu_id, h, &ctxt);
-        if ( err )
-            break;
-    }
+    ctxt.caps = v->arch.vmce.mcg_cap;
+    ctxt.mci_ctl2_bank0 = v->arch.vmce.bank[0].mci_ctl2;
+    ctxt.mci_ctl2_bank1 = v->arch.vmce.bank[1].mci_ctl2;
+    ctxt.mcg_ext_ctl = v->arch.vmce.mcg_ext_ctl;
 
-    return err;
+    return hvm_save_entry(VMCE_VCPU, v->vcpu_id, h, &ctxt);
 }
 
 static int vmce_load_vcpu_ctxt(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®.