All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 1/8] x86/cpu: Introduce vmce_save_vcpu_ctxt_one() func
@ 2018-05-29 14:58 Alexandru Isaila
  2018-05-29 14:58 ` [PATCH v5 2/8] x86/hvm: Introduce hvm_save_tsc_adjust_one() func Alexandru Isaila
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Alexandru Isaila @ 2018-05-29 14:58 UTC (permalink / raw)
  To: xen-devel
  Cc: wei.liu2, andrew.cooper3, ian.jackson, paul.durrant, jbeulich,
	Alexandru Isaila

This is used to save data from a single instance.

Signed-off-by: Alexandru Isaila <aisaila@bitdefender.com>
---
 xen/arch/x86/cpu/mcheck/vmce.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/cpu/mcheck/vmce.c b/xen/arch/x86/cpu/mcheck/vmce.c
index e07cd2f..404f27e 100644
--- a/xen/arch/x86/cpu/mcheck/vmce.c
+++ b/xen/arch/x86/cpu/mcheck/vmce.c
@@ -349,6 +349,14 @@ 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;
@@ -356,13 +364,9 @@ static int vmce_save_vcpu_ctxt(struct domain *d, hvm_domain_context_t *h)
 
     for_each_vcpu ( d, v )
     {
-        struct hvm_vmce_vcpu ctxt = {
-            .caps = v->arch.vmce.mcg_cap,
-            .mci_ctl2_bank0 = v->arch.vmce.bank[0].mci_ctl2,
-            .mci_ctl2_bank1 = v->arch.vmce.bank[1].mci_ctl2,
-            .mcg_ext_ctl = v->arch.vmce.mcg_ext_ctl,
-        };
+        struct hvm_vmce_vcpu ctxt;
 
+        vmce_save_vcpu_ctxt_one(v, &ctxt);
         err = hvm_save_entry(VMCE_VCPU, v->vcpu_id, h, &ctxt);
         if ( err )
             break;
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-06-06 12:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-29 14:58 [PATCH v5 1/8] x86/cpu: Introduce vmce_save_vcpu_ctxt_one() func Alexandru Isaila
2018-05-29 14:58 ` [PATCH v5 2/8] x86/hvm: Introduce hvm_save_tsc_adjust_one() func Alexandru Isaila
2018-05-29 14:58 ` [PATCH v5 3/8] x86/hvm: Introduce hvm_save_cpu_ctxt_one func Alexandru Isaila
2018-05-29 14:58 ` [PATCH v5 4/8] x86/hvm: Introduce hvm_save_cpu_xsave_states_one Alexandru Isaila
2018-05-29 14:58 ` [PATCH v5 5/8] x86/hvm: Introduce hvm_save_cpu_msrs_one func Alexandru Isaila
2018-06-04  9:08   ` Paul Durrant
2018-05-29 14:58 ` [PATCH v5 6/8] x86/hvm: Introduce hvm_save_mtrr_msr_one func Alexandru Isaila
2018-05-29 14:58 ` [PATCH v5 7/8] x86/hvm: Introduce viridian_save_vcpu_ctxt_one() func Alexandru Isaila
2018-06-04  9:11   ` Paul Durrant
2018-05-29 14:58 ` [PATCH v5 8/8] x86/domctl: Don't pause the whole domain if only getting vcpu state Alexandru Isaila
2018-06-04  9:21   ` Paul Durrant
2018-06-06 12:35   ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.