x86/cpu: Introduce vmce_save_vcpu_ctxt_one() func
PATCH v6 1/8 x86/cpu: Introduce vmce_save_vcpu_ctxt_one() func
This is used to save data from a single instance.
--- xen/arch/x86/cpu/mcheck/vmce.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
xen/arch/x86/cpu/mcheck/vmce.c +10 -6
@@ -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 ;
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v6 2/8 x86/hvm: Introduce hvm_save_tsc_adjust_one() func
This is used to save data from a single instance.
--- xen/arch/x86/hvm/hvm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
xen/arch/x86/hvm/hvm.c +6 -1
@@ -740,6 +740,11 @@ 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;
@@ -748,7 +753,7 @@ static int hvm_save_tsc_adjust(struct domain *d, hvm_domain_context_t *h) for_each_vcpu ( d, v ) { - ctxt.tsc_adjust = v->arch.hvm_vcpu.msr_tsc_adjust; +hvm_save_tsc_adjust_one (v, &ctxt); err =hvm_save_entry (TSC_ADJUST , v->vcpu_id, h, &ctxt);if ( err )break ;
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v6 3/8 x86/hvm: Introduce hvm_save_cpu_ctxt_one func
In reply to Alexandru IsailaThis is used to save data from a single instance.
--- xen/arch/x86/hvm/hvm.c | 195 +++++++++++++++++++++++++------------------------ 1 file changed, 100 insertions(+), 95 deletions(-)
xen/arch/x86/hvm/hvm.c +100 -95
@@ -785,11 +785,109 @@ static int hvm_load_tsc_adjust(struct domain *d, hvm_domain_context_t *h)HVM_REGISTER_SAVE_RESTORE (TSC_ADJUST , hvm_save_tsc_adjust, hvm_load_tsc_adjust,1 ,HVMSR_PER_VCPU ); +static void hvm_save_cpu_ctxt_one (struct vcpu *v,struct hvm_hw_cpu *ctxt) +{ +struct segment_register seg; + +/* Architecture-specific vmcs/vmcb bits */ + hvm_funcs.save_cpu_ctxt (v, ctxt); + + ctxt->tsc =hvm_get_guest_tsc_fixed (v, v->domain->arch.hvm_domain.sync_tsc); + + ctxt->msr_tsc_aux =hvm_msr_tsc_aux (v); + +hvm_get_segment_register (v, x86_seg_idtr, &seg); + ctxt->idtr_limit = seg.limit; + ctxt->idtr_base = seg.base; + +hvm_get_segment_register (v, x86_seg_gdtr, &seg); + ctxt->gdtr_limit = seg.limit; + ctxt->gdtr_base = seg.base; + +hvm_get_segment_register (v, x86_seg_cs, &seg); + ctxt->cs_sel = seg.sel; + ctxt->cs_limit = seg.limit; + ctxt->cs_base = seg.base; + ctxt->cs_arbytes = seg.attr; + +hvm_get_segment_register (v, x86_seg_ds, &seg); + ctxt->ds_sel = seg.sel; + ctxt->ds_limit = seg.limit; + ctxt->ds_base = seg.base; + ctxt->ds_arbytes = seg.attr; + +hvm_get_segment_register (v, x86_seg_es, &seg); + ctxt->es_sel = seg.sel; + ctxt->es_limit = seg.limit; + ctxt->es_base = seg.base; + ctxt->es_arbytes = seg.attr; + +hvm_get_segment_register (v, x86_seg_ss, &seg); + ctxt->ss_sel = seg.sel; + ctxt->ss_limit = seg.limit; + ctxt->ss_base = seg.base; + ctxt->ss_arbytes = seg.attr; + +hvm_get_segment_register (v, x86_seg_fs, &seg); + ctxt->fs_sel = seg.sel; + ctxt->fs_limit = seg.limit; + ctxt->fs_base = seg.base; + ctxt->fs_arbytes = seg.attr; + +hvm_get_segment_register (v, x86_seg_gs, &seg); + ctxt->gs_sel = seg.sel; + ctxt->gs_limit = seg.limit; + ctxt->gs_base = seg.base; + ctxt->gs_arbytes = seg.attr; + +hvm_get_segment_register (v, x86_seg_tr, &seg); + ctxt->tr_sel = seg.sel; + ctxt->tr_limit = seg.limit; + ctxt->tr_base = seg.base; + ctxt->tr_arbytes = seg.attr; + +hvm_get_segment_register (v, x86_seg_ldtr, &seg); + ctxt->ldtr_sel = seg.sel; + ctxt->ldtr_limit = seg.limit; + ctxt->ldtr_base = seg.base; + ctxt->ldtr_arbytes = seg.attr; + +if ( v->fpu_initialised ) + { +memcpy (ctxt->fpu_regs, v->arch.fpu_ctxt,sizeof (ctxt->fpu_regs)); + ctxt->flags =XEN_X86_FPU_INITIALISED ; + } + + ctxt->rax = v->arch.user_regs.rax; + ctxt->rbx = v->arch.user_regs.rbx; + ctxt->rcx = v->arch.user_regs.rcx; + ctxt->rdx = v->arch.user_regs.rdx; + ctxt->rbp = v->arch.user_regs.rbp; + ctxt->rsi = v->arch.user_regs.rsi; + ctxt->rdi = v->arch.user_regs.rdi; + ctxt->rsp = v->arch.user_regs.rsp; + ctxt->rip = v->arch.user_regs.rip; + ctxt->rflags = v->arch.user_regs.rflags; + ctxt->r8 = v->arch.user_regs.r8; + ctxt->r9 = v->arch.user_regs.r9; + ctxt->r10 = v->arch.user_regs.r10; + ctxt->r11 = v->arch.user_regs.r11; + ctxt->r12 = v->arch.user_regs.r12; + ctxt->r13 = v->arch.user_regs.r13; + ctxt->r14 = v->arch.user_regs.r14; + ctxt->r15 = v->arch.user_regs.r15; + ctxt->dr0 = v->arch.debugreg[0 ]; + ctxt->dr1 = v->arch.debugreg[1 ]; + ctxt->dr2 = v->arch.debugreg[2 ]; + ctxt->dr3 = v->arch.debugreg[3 ]; + ctxt->dr6 = v->arch.debugreg[6 ]; + ctxt->dr7 = v->arch.debugreg[7 ]; +} +static int hvm_save_cpu_ctxt (struct domain *d,hvm_domain_context_t *h) {struct vcpu *v;struct hvm_hw_cpu ctxt; -struct segment_register seg; for_each_vcpu ( d, v ) {
@@ -799,100 +897,7 @@ static int hvm_save_cpu_ctxt(struct domain *d, hvm_domain_context_t *h)continue ;memset (&ctxt,0 ,sizeof (ctxt)); - -/* Architecture-specific vmcs/vmcb bits */ - hvm_funcs.save_cpu_ctxt (v, &ctxt); - - ctxt.tsc =hvm_get_guest_tsc_fixed (v, d->arch.hvm_domain.sync_tsc); - - ctxt.msr_tsc_aux =hvm_msr_tsc_aux (v); - -hvm_get_segment_register (v, x86_seg_idtr, &seg); - ctxt.idtr_limit = seg.limit; - ctxt.idtr_base = seg.base; - -hvm_get_segment_register (v, x86_seg_gdtr, &seg); - ctxt.gdtr_limit = seg.limit; - ctxt.gdtr_base = seg.base; - -hvm_get_segment_register (v, x86_seg_cs, &seg); - ctxt.cs_sel = seg.sel; - ctxt.cs_limit = seg.limit; - ctxt.cs_base = seg.base; - ctxt.cs_arbytes = seg.attr; - -hvm_get_segment_register (v, x86_seg_ds, &seg); - ctxt.ds_sel = seg.sel; - ctxt.ds_limit = seg.limit; - ctxt.ds_base = seg.base; - ctxt.ds_arbytes = seg.attr; - -hvm_get_segment_register (v, x86_seg_es, &seg); - ctxt.es_sel = seg.sel; - ctxt.es_limit = seg.limit; - ctxt.es_base = seg.base; - ctxt.es_arbytes = seg.attr; - -hvm_get_segment_register (v, x86_seg_ss, &seg); - ctxt.ss_sel = seg.sel; - ctxt.ss_limit = seg.limit; - ctxt.ss_base = seg.base; - ctxt.ss_arbytes = seg.attr; - -hvm_get_segment_register (v, x86_seg_fs, &seg); - ctxt.fs_sel = seg.sel; - ctxt.fs_limit = seg.limit; - ctxt.fs_base = seg.base; - ctxt.fs_arbytes = seg.attr; - -hvm_get_segment_register (v, x86_seg_gs, &seg); - ctxt.gs_sel = seg.sel; - ctxt.gs_limit = seg.limit; - ctxt.gs_base = seg.base; - ctxt.gs_arbytes = seg.attr; - -hvm_get_segment_register (v, x86_seg_tr, &seg); - ctxt.tr_sel = seg.sel; - ctxt.tr_limit = seg.limit; - ctxt.tr_base = seg.base; - ctxt.tr_arbytes = seg.attr; - -hvm_get_segment_register (v, x86_seg_ldtr, &seg); - ctxt.ldtr_sel = seg.sel; - ctxt.ldtr_limit = seg.limit; - ctxt.ldtr_base = seg.base; - ctxt.ldtr_arbytes = seg.attr; - -if ( v->fpu_initialised ) - { -memcpy (ctxt.fpu_regs, v->arch.fpu_ctxt,sizeof (ctxt.fpu_regs)); - ctxt.flags =XEN_X86_FPU_INITIALISED ; - } - - ctxt.rax = v->arch.user_regs.rax; - ctxt.rbx = v->arch.user_regs.rbx; - ctxt.rcx = v->arch.user_regs.rcx; - ctxt.rdx = v->arch.user_regs.rdx; - ctxt.rbp = v->arch.user_regs.rbp; - ctxt.rsi = v->arch.user_regs.rsi; - ctxt.rdi = v->arch.user_regs.rdi; - ctxt.rsp = v->arch.user_regs.rsp; - ctxt.rip = v->arch.user_regs.rip; - ctxt.rflags = v->arch.user_regs.rflags; - ctxt.r8 = v->arch.user_regs.r8; - ctxt.r9 = v->arch.user_regs.r9; - ctxt.r10 = v->arch.user_regs.r10; - ctxt.r11 = v->arch.user_regs.r11; - ctxt.r12 = v->arch.user_regs.r12; - ctxt.r13 = v->arch.user_regs.r13; - ctxt.r14 = v->arch.user_regs.r14; - ctxt.r15 = v->arch.user_regs.r15; - ctxt.dr0 = v->arch.debugreg[0 ]; - ctxt.dr1 = v->arch.debugreg[1 ]; - ctxt.dr2 = v->arch.debugreg[2 ]; - ctxt.dr3 = v->arch.debugreg[3 ]; - ctxt.dr6 = v->arch.debugreg[6 ]; - ctxt.dr7 = v->arch.debugreg[7 ]; +hvm_save_cpu_ctxt_one (v, &ctxt);if (hvm_save_entry (CPU , v->vcpu_id, h, &ctxt) !=0 )return 1 ;
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v6 4/8 x86/hvm: Introduce hvm_save_cpu_xsave_states_one
In reply to Alexandru IsailaThis is used to save data from a single instance.
--- xen/arch/x86/hvm/hvm.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
xen/arch/x86/hvm/hvm.c +8 -3
@@ -1183,6 +1183,13 @@ HVM_REGISTER_SAVE_RESTORE(CPU, hvm_save_cpu_ctxt, hvm_load_cpu_ctxt, save_area) + \ xstate_ctxt_size(xcr0)) +static void hvm_save_cpu_xsave_states_one (struct vcpu *v,struct hvm_hw_cpu_xsave *ctxt) +{ + ctxt->xfeature_mask = xfeature_mask; + ctxt->xcr0 = v->arch.xcr0; + ctxt->xcr0_accum = v->arch.xcr0_accum; +} +static int hvm_save_cpu_xsave_states (struct domain *d,hvm_domain_context_t *h) {struct vcpu *v;
@@ -1202,9 +1209,7 @@ static int hvm_save_cpu_xsave_states(struct domain *d, hvm_domain_context_t *h) ctxt = (struct hvm_hw_cpu_xsave *)&h->data[h->cur]; h->cur += size; - ctxt->xfeature_mask = xfeature_mask; - ctxt->xcr0 = v->arch.xcr0; - ctxt->xcr0_accum = v->arch.xcr0_accum; +hvm_save_cpu_xsave_states_one (v, ctxt);expand_xsave_states (v, &ctxt->save_area, size - offsetof(typeof(*ctxt), save_area)); }
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v6 5/8 x86/hvm: Introduce hvm_save_cpu_msrs_one func
In reply to Alexandru IsailaThis is used to save data from a single instance.
---
Changes since V5:
- Check the return value of hvm_save_cpu_msrs_one()
--- xen/arch/x86/hvm/hvm.c | 60 ++++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 26 deletions(-)
xen/arch/x86/hvm/hvm.c +34 -26
@@ -1354,6 +1354,38 @@ static const uint32_t msrs_to_send[] = { };static unsigned int __read_mostly msr_count_max =ARRAY_SIZE (msrs_to_send); +static int hvm_save_cpu_msrs_one (struct vcpu *v,struct hvm_msr *ctxt) +{ +unsigned int i; + +for ( i =0 ; i <ARRAY_SIZE (msrs_to_send); ++i ) + { +uint64_t val; +int rc =guest_rdmsr (v, msrs_to_send[i], &val); + +/* +* It is the programmers responsibility to ensure that +* msrs_to_send[] contain generally-read/write MSRs. +* X86EMUL_EXCEPTION here implies a missing feature, and that the +* guest doesn't have access to the MSR. +*/ +if ( rc ==X86EMUL_EXCEPTION ) +continue ; + +if ( rc !=X86EMUL_OKAY ) + { +ASSERT_UNREACHABLE (); +return -ENXIO ; + } + +if ( !val ) +continue ;/* Skip empty MSRs. */ + ctxt->msr[ctxt->count].index = msrs_to_send[i]; + ctxt->msr[ctxt->count++].val = val; + } +return 0 ; +} +static int hvm_save_cpu_msrs (struct domain *d,hvm_domain_context_t *h) {struct vcpu *v;
@@ -1370,32 +1402,8 @@ static int hvm_save_cpu_msrs(struct domain *d, hvm_domain_context_t *h) ctxt = (struct hvm_msr *)&h->data[h->cur]; ctxt->count =0 ; -for ( i =0 ; i <ARRAY_SIZE (msrs_to_send); ++i ) - { -uint64_t val; -int rc =guest_rdmsr (v, msrs_to_send[i], &val); - -/* -* It is the programmers responsibility to ensure that -* msrs_to_send[] contain generally-read/write MSRs. -* X86EMUL_EXCEPTION here implies a missing feature, and that the -* guest doesn't have access to the MSR. -*/ -if ( rc ==X86EMUL_EXCEPTION ) -continue ; - -if ( rc !=X86EMUL_OKAY ) - { -ASSERT_UNREACHABLE (); -return -ENXIO ; - } - -if ( !val ) -continue ;/* Skip empty MSRs. */ - - ctxt->msr[ctxt->count].index = msrs_to_send[i]; - ctxt->msr[ctxt->count++].val = val; - } +if (hvm_save_cpu_msrs_one (v, ctxt) == -ENXIO ) +return -ENXIO ;if ( hvm_funcs.save_msr ) hvm_funcs.save_msr (v, ctxt);
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v6 6/8 x86/hvm: Introduce hvm_save_mtrr_msr_one func
In reply to Alexandru IsailaThis is used to save data from a single instance.
--- xen/arch/x86/hvm/mtrr.c | 52 +++++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 23 deletions(-)
xen/arch/x86/hvm/mtrr.c +29 -23
@@ -666,36 +666,42 @@ int hvm_set_mem_pinned_cacheattr(struct domain *d, uint64_t gfn_start,return 0 ; } -static int hvm_save_mtrr_msr (struct domain *d,hvm_domain_context_t *h) +static void hvm_save_mtrr_msr_one (struct vcpu *v,struct hvm_hw_mtrr *hw_mtrr) { +struct mtrr_state *mtrr_state = &v->arch.hvm_vcpu.mtrr;int i; -struct vcpu *v; -struct hvm_hw_mtrr hw_mtrr; -struct mtrr_state *mtrr_state; -/* save mtrr&pat */ -for_each_vcpu (d, v) + +hvm_get_guest_pat (v, &hw_mtrr->msr_pat_cr); + + hw_mtrr->msr_mtrr_def_type = mtrr_state->def_type + | (mtrr_state->enabled <<10 ); + hw_mtrr->msr_mtrr_cap = mtrr_state->mtrr_cap; + +for ( i =0 ; i <MTRR_VCNT ; i++ ) { - mtrr_state = &v->arch.hvm_vcpu.mtrr; +/* save physbase */ + hw_mtrr->msr_mtrr_var[i*2 ] = + ((uint64_t *)mtrr_state->var_ranges)[i*2 ]; +/* save physmask */ + hw_mtrr->msr_mtrr_var[i*2 +1 ] = + ((uint64_t *)mtrr_state->var_ranges)[i*2 +1 ]; + } -hvm_get_guest_pat (v, &hw_mtrr.msr_pat_cr); +for ( i =0 ; i <NUM_FIXED_MSR ; i++ ) + hw_mtrr->msr_mtrr_fixed[i] = + ((uint64_t *)mtrr_state->fixed_ranges)[i]; - hw_mtrr.msr_mtrr_def_type = mtrr_state->def_type - | (mtrr_state->enabled <<10 ); - hw_mtrr.msr_mtrr_cap = mtrr_state->mtrr_cap; +} -for ( i =0 ; i <MTRR_VCNT ; i++ ) - { -/* save physbase */ - hw_mtrr.msr_mtrr_var[i*2 ] = - ((uint64_t *)mtrr_state->var_ranges)[i*2 ]; -/* save physmask */ - hw_mtrr.msr_mtrr_var[i*2 +1 ] = - ((uint64_t *)mtrr_state->var_ranges)[i*2 +1 ]; - } +static int hvm_save_mtrr_msr (struct domain *d,hvm_domain_context_t *h) +{ +struct vcpu *v; +struct hvm_hw_mtrr hw_mtrr; +/* save mtrr&pat */ -for ( i =0 ; i <NUM_FIXED_MSR ; i++ ) - hw_mtrr.msr_mtrr_fixed[i] = - ((uint64_t *)mtrr_state->fixed_ranges)[i]; +for_each_vcpu (d, v) + { +hvm_save_mtrr_msr_one (v, &hw_mtrr);if (hvm_save_entry (MTRR , v->vcpu_id, h, &hw_mtrr) !=0 )return 1 ;
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v6 7/8 x86/hvm: Introduce viridian_save_vcpu_ctxt_one() func
In reply to Alexandru IsailaThis is used to save data from a single instance.
---
Changes since V5:
- Add memset to 0 for ctxt->_pad
--- xen/arch/x86/hvm/viridian.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
xen/arch/x86/hvm/viridian.c +10 -4
@@ -1026,6 +1026,13 @@ static int viridian_load_domain_ctxt(struct domain *d, hvm_domain_context_t *h)HVM_REGISTER_SAVE_RESTORE (VIRIDIAN_DOMAIN , viridian_save_domain_ctxt, viridian_load_domain_ctxt,1 ,HVMSR_PER_DOM ); +static void viridian_save_vcpu_ctxt_one (struct vcpu *v,struct hvm_viridian_vcpu_context *ctxt) +{ + ctxt->vp_assist_msr = v->arch.hvm_vcpu.viridian.vp_assist.msr.raw; + ctxt->vp_assist_pending = v->arch.hvm_vcpu.viridian.vp_assist.pending; +memset (ctxt->_pad,0 ,sizeof (ctxt->_pad)); +} +static int viridian_save_vcpu_ctxt (struct domain *d,hvm_domain_context_t *h) {struct vcpu *v;
@@ -1034,10 +1041,9 @@ static int viridian_save_vcpu_ctxt(struct domain *d, hvm_domain_context_t *h)return 0 ;for_each_vcpu ( d, v ) { -struct hvm_viridian_vcpu_context ctxt = { - .vp_assist_msr = v->arch.hvm_vcpu.viridian.vp_assist.msr.raw, - .vp_assist_pending = v->arch.hvm_vcpu.viridian.vp_assist.pending, - }; +struct hvm_viridian_vcpu_context ctxt; + +viridian_save_vcpu_ctxt_one (v, &ctxt);if (hvm_save_entry (VIRIDIAN_VCPU , v->vcpu_id, h, &ctxt) !=0 )return 1 ;
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH v6 7/8] x86/hvm: Introduce viridian_save_vcpu_ctxt_one() func
Quoted 28 lines
-----Original Message-----
From: Alexandru Isaila [mailto:[email protected]]
Sent: 06 June 2018 13:25
To: [email protected]
Cc: Ian Jackson <[email protected]>; Wei Liu <[email protected]>; [email protected]; Andrew Cooper <[email protected]>; Paul Durrant <[email protected]>; Alexandru Isaila <[email protected]>
Subject: [PATCH v6 7/8] x86/hvm: Introduceviridian_save_vcpu_ctxt_one()funcThis is used to save data from a single instance.
Signed-off-by Alexandru Isaila <[email protected]>---
Changes since V5:
- Add memset to 0 forctxt->_pad--- xen/arch/x86/hvm/viridian.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)xen/arch/x86/hvm/viridian.c +0
-0@@ -1026,6 +1026,13 @@ static int viridian_load_domain_ctxt(struct domain *d, hvm_domain_context_t *h)
xen/arch/x86/hvm/viridian.c static int viridian_load_domain_ctxt(struct domain · line 1036
Quoted 10 lines
xen/arch/x86/hvm/viridian.c +5
-0HVM_REGISTER_SAVE_RESTORE (VIRIDIAN_DOMAIN , viridian_save_domain_ctxt, viridian_load_domain_ctxt,1 ,HVMSR_PER_DOM ); +static void viridian_save_vcpu_ctxt_one (struct vcpu *v,struct hvm_viridian_vcpu_context *ctxt) +{ + ctxt->vp_assist_msr = v->arch.hvm_vcpu.viridian.vp_assist.msr.raw; + ctxt->vp_assist_pending = v->arch.hvm_vcpu.viridian.vp_assist.pending; +memset (ctxt->_pad,0 ,sizeof (ctxt->_pad));
Sorry, this is not what I meant. What I meant was:
memset(ctx, 0, sizeof(*ctx));ctxt->vp_assist_msr = v->arch.hvm_vcpu.viridian.vp_assist.msr.raw; ctxt->vp_assist_pending = v->arch.hvm_vcpu.viridian.vp_assist.pending;
Paul
Quoted 21 lines
xen/arch/x86/hvm/viridian.c +2
-0+} +static int viridian_save_vcpu_ctxt(struct domain *d,
hvm_domain_context_t
*h){ struct vcpu *v;xen/arch/x86/hvm/viridian.c +3
-4@@ -1034,10 +1041,9 @@ static int viridian_save_vcpu_ctxt(struct domain *d, hvm_domain_context_t *h)return 0 ;for_each_vcpu ( d, v ) { -struct hvm_viridian_vcpu_context ctxt = { - .vp_assist_msr = v->arch.hvm_vcpu.viridian.vp_assist.msr.raw, - .vp_assist_pending = v->arch.hvm_vcpu.viridian.vp_assist.pending, - }; +struct hvm_viridian_vcpu_context ctxt; + +viridian_save_vcpu_ctxt_one (v, &ctxt);if (hvm_save_entry (VIRIDIAN_VCPU , v->vcpu_id, h, &ctxt) !=0 )return 1;
Quoted 2 lines
--
2.7.4
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH v6 7/8] x86/hvm: Introduce viridian_save_vcpu_ctxt_one() func
Quoted 43 lines · Paul Durrant
Quoted 43 lines
-----Original Message-----
From: Alexandru Isaila [mailto:[email protected]]
Sent: 06 June 2018 13:25
To: [email protected]
Cc: Ian Jackson <[email protected]>; Wei Liu <wei.liu2@citrix. com>;
[email protected]; Andrew Cooper <[email protected]>; Paul Durrant <[email protected]>; Alexandru Isaila <[email protected]>
Subject: [PATCH v6 7/8] x86/hvm: Introduceviridian_save_vcpu_ctxt_one()
funcThis is used to save data from a single instance.
Signed-off-by Alexandru Isaila <[email protected]>---
Changes since V5:
- Add memset to 0 forctxt->_pad
---
xen/arch/x86/hvm/viridian.c | 14 ++++++++++----1 file changed, 10 insertions(+), 4 deletions(-)xen/arch/x86/hvm/viridian.c +0
-0@@ -1026,6 +1026,13 @@ static int viridian_load_domain_ctxt(structdomain
*d,hvm_domain_context_t*h)HVM_REGISTER_SAVE_RESTORE(VIRIDIAN_DOMAIN, viridian_save_domain_ctxt, viridian_load_domain_ctxt, 1, HVMSR_PER_DOM);+static void
viridian_save_vcpu_ctxt_one(struct vcpu *v, struct hvm_viridian_vcpu_context *ctxt)
+{
+ ctxt->vp_assist_msr = v-Quoted 1 line
arch.hvm_vcpu.viridian.vp_assist.msr.raw;
Quoted 10 lines
Quoted 3 lines
+ ctxt->vp_assist_pending = v-
Quoted 1 line
arch.hvm_vcpu.viridian.vp_assist.pending;
+ memset(ctxt->_pad, 0,
sizeof(ctxt->_pad));Sorry, this is not what I meant. What I meant was:
memset(ctx, 0, sizeof(*ctx));ctxt->vp_assist_msr=v->arch.hvm_vcpu.viridian.vp_assist.msr.raw;ctxt->vp_assist_pending= v-Quoted 1 line
arch.hvm_vcpu.viridian.vp_assist.pending;
Sorry for the misunderstanding, I'll fix it on the next version
Alex
Quoted 25 lines
Quoted 25 lines
xen/arch/x86/hvm/viridian.c +2
-0+} +static int viridian_save_vcpu_ctxt(struct domain *d,
hvm_domain_context_t
*h)
{
struct vcpu *v;xen/arch/x86/hvm/viridian.c +0
-0@@ -1034,10 +1041,9 @@ static int viridian_save_vcpu_ctxt(structdomain
*d,hvm_domain_context_t*h)
return 0;for_each_vcpu( d, v ) {
- structhvm_viridian_vcpu_contextctxt = { - .vp_assist_msr = v-Quoted 1 line
arch.hvm_vcpu.viridian.vp_assist.msr.raw,
- .vp_assist_pending = v-
Quoted 1 line
arch.hvm_vcpu.viridian.vp_assist.pending,
- };
+ structhvm_viridian_vcpu_contextctxt;
+
+ viridian_save_vcpu_ctxt_one(v, &ctxt);
Quoted 8 lines
Quoted 5 lines
if (
hvm_save_entry(VIRIDIAN_VCPU, v->vcpu_id, h, &ctxt)!= 0 )
return 1;
--
2.7.4________________________
This email was scanned by Bitdefender
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v6 8/8 x86/domctl: Don't pause the whole domain if only getting vcpu state
In reply to Alexandru IsailaThis patch is focused on merging the *save() funcs to the *save_one() funcs to remove redundancy. Also the for loop is moved to the caller so now we can save info for a single vcpu instance.
---
Changes since V5:
- Removed err var and return the hvm_save_entry() result
- Moved the rc init inside the if clause
- Defined CONTINUE as a return for the 2 result
--- xen/arch/x86/cpu/mcheck/vmce.c | 30 ++-- xen/arch/x86/hvm/hpet.c | 3 +- xen/arch/x86/hvm/hvm.c | 288 ++++++++++++++++---------------------- xen/arch/x86/hvm/i8254.c | 3 +- xen/arch/x86/hvm/irq.c | 9 +- xen/arch/x86/hvm/mtrr.c | 36 ++--- xen/arch/x86/hvm/pmtimer.c | 3 +- xen/arch/x86/hvm/rtc.c | 3 +- xen/arch/x86/hvm/save.c | 127 ++++++++++++----- xen/arch/x86/hvm/vioapic.c | 3 +- xen/arch/x86/hvm/viridian.c | 30 ++-- xen/arch/x86/hvm/vlapic.c | 28 ++-- xen/arch/x86/hvm/vpic.c | 3 +- xen/include/asm-x86/hvm/save.h | 2 +- xen/include/asm-x86/hvm/support.h | 2 + 15 files changed, 273 insertions(+), 297 deletions(-)
xen/arch/x86/cpu/mcheck/vmce.c +8 -22
@@ -349,30 +349,16 @@ 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) +static int vmce_save_vcpu_ctxt_one (struct vcpu *v,hvm_domain_context_t *h) { - 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; -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)
@@ -394,7 +380,7 @@ static int vmce_load_vcpu_ctxt(struct domain *d, hvm_domain_context_t *h)return err ?:vmce_restore_vcpu (v, &ctxt); } -HVM_REGISTER_SAVE_RESTORE (VMCE_VCPU , vmce_save_vcpu_ctxt, +HVM_REGISTER_SAVE_RESTORE (VMCE_VCPU , vmce_save_vcpu_ctxt_one, vmce_load_vcpu_ctxt,1 ,HVMSR_PER_VCPU );/*
xen/arch/x86/hvm/hpet.c +2 -1
@@ -516,8 +516,9 @@ static const struct hvm_mmio_ops hpet_mmio_ops = { }; -static int hpet_save (struct domain *d,hvm_domain_context_t *h) +static int hpet_save (struct vcpu *vcpu,hvm_domain_context_t *h) { +struct domain *d = vcpu->domain;HPETState *hp =domain_vhpet (d);struct vcpu *v =pt_global_vcpu_target (d);int rc;
xen/arch/x86/hvm/hvm.c +117 -171
382 lines not on this page · raw message
xen/arch/x86/hvm/i8254.c +2 -1
@@ -390,8 +390,9 @@ void pit_stop_channel0_irq(PITState *pit)spin_unlock (&pit->lock); } -static int pit_save (struct domain *d,hvm_domain_context_t *h) +static int pit_save (struct vcpu *v,hvm_domain_context_t *h) { +struct domain *d = v->domain;PITState *pit =domain_vpit (d);int rc;
xen/arch/x86/hvm/irq.c +6 -3
@@ -630,8 +630,9 @@ static int __init dump_irq_info_key_init(void) }__initcall (dump_irq_info_key_init); -static int irq_save_pci (struct domain *d,hvm_domain_context_t *h) +static int irq_save_pci (struct vcpu *v,hvm_domain_context_t *h) { +struct domain *d = v->domain;struct hvm_irq *hvm_irq =hvm_domain_irq (d);unsigned int asserted, pdev, pintx;int rc;
@@ -662,16 +663,18 @@ static int irq_save_pci(struct domain *d, hvm_domain_context_t *h)return rc; } -static int irq_save_isa (struct domain *d,hvm_domain_context_t *h) +static int irq_save_isa (struct vcpu *v,hvm_domain_context_t *h) { +struct domain *d = v->domain;struct hvm_irq *hvm_irq =hvm_domain_irq (d);/* Save ISA IRQ lines */ return (hvm_save_entry (ISA_IRQ ,0 , h, &hvm_irq->isa_irq) ); } -static int irq_save_link (struct domain *d,hvm_domain_context_t *h) +static int irq_save_link (struct vcpu *v,hvm_domain_context_t *h) { +struct domain *d = v->domain;struct hvm_irq *hvm_irq =hvm_domain_irq (d);/* Save PCI-ISA link state */
xen/arch/x86/hvm/mtrr.c +13 -23
@@ -666,46 +666,36 @@ int hvm_set_mem_pinned_cacheattr(struct domain *d, uint64_t gfn_start,return 0 ; } -static void hvm_save_mtrr_msr_one (struct vcpu *v,struct hvm_hw_mtrr *hw_mtrr) +static int hvm_save_mtrr_msr_one (struct vcpu *v,hvm_domain_context_t *h) { -struct mtrr_state *mtrr_state = &v->arch.hvm_vcpu.mtrr;int i; +struct mtrr_state *mtrr_state = &v->arch.hvm_vcpu.mtrr; +struct hvm_hw_mtrr hw_mtrr; +/* save mtrr&pat */ -hvm_get_guest_pat (v, &hw_mtrr->msr_pat_cr); +hvm_get_guest_pat (v, &hw_mtrr.msr_pat_cr); - hw_mtrr->msr_mtrr_def_type = mtrr_state->def_type + hw_mtrr.msr_mtrr_def_type = mtrr_state->def_type | (mtrr_state->enabled <<10 ); - hw_mtrr->msr_mtrr_cap = mtrr_state->mtrr_cap; + hw_mtrr.msr_mtrr_cap = mtrr_state->mtrr_cap;for ( i =0 ; i <MTRR_VCNT ; i++ ) {/* save physbase */ - hw_mtrr->msr_mtrr_var[i*2 ] = + hw_mtrr.msr_mtrr_var[i*2 ] = ((uint64_t *)mtrr_state->var_ranges)[i*2 ];/* save physmask */ - hw_mtrr->msr_mtrr_var[i*2 +1 ] = + hw_mtrr.msr_mtrr_var[i*2 +1 ] = ((uint64_t *)mtrr_state->var_ranges)[i*2 +1 ]; }for ( i =0 ; i <NUM_FIXED_MSR ; i++ ) - hw_mtrr->msr_mtrr_fixed[i] = + hw_mtrr.msr_mtrr_fixed[i] = ((uint64_t *)mtrr_state->fixed_ranges)[i]; -} - -static int hvm_save_mtrr_msr (struct domain *d,hvm_domain_context_t *h) -{ -struct vcpu *v; -struct hvm_hw_mtrr hw_mtrr; -/* save mtrr&pat */ - -for_each_vcpu (d, v) - { -hvm_save_mtrr_msr_one (v, &hw_mtrr); +if (hvm_save_entry (MTRR , v->vcpu_id, h, &hw_mtrr) !=0 ) +return 1 ; -if (hvm_save_entry (MTRR , v->vcpu_id, h, &hw_mtrr) !=0 ) -return 1 ; - }return 0 ; }
@@ -751,7 +741,7 @@ static int hvm_load_mtrr_msr(struct domain *d, hvm_domain_context_t *h)return 0 ; } -HVM_REGISTER_SAVE_RESTORE (MTRR , hvm_save_mtrr_msr, hvm_load_mtrr_msr, +HVM_REGISTER_SAVE_RESTORE (MTRR , hvm_save_mtrr_msr_one, hvm_load_mtrr_msr,1 ,HVMSR_PER_VCPU );void memory_type_changed (struct domain *d)
xen/arch/x86/hvm/pmtimer.c +2 -1
@@ -249,8 +249,9 @@ static int handle_pmt_io(return X86EMUL_OKAY ; } -static int acpi_save (struct domain *d,hvm_domain_context_t *h) +static int acpi_save (struct vcpu *v,hvm_domain_context_t *h) { +struct domain *d = v->domain;struct hvm_hw_acpi *acpi = &d->arch.hvm_domain.acpi;PMTState *s = &d->arch.hvm_domain.pl_time->vpmt;uint32_t x, msb = acpi->tmr_val &TMR_VAL_MSB ;
xen/arch/x86/hvm/rtc.c +2 -1
@@ -737,8 +737,9 @@ void rtc_migrate_timers(struct vcpu *v) }/* Save RTC hardware state */ -static int rtc_save (struct domain *d,hvm_domain_context_t *h) +static int rtc_save (struct vcpu *v,hvm_domain_context_t *h) { +struct domain *d = v->domain;RTCState *s =domain_vrtc (d);int rc;
xen/arch/x86/hvm/save.c +93 -34
164 lines not on this page · raw message
xen/arch/x86/hvm/vioapic.c +2 -1
@@ -569,8 +569,9 @@ int vioapic_get_trigger_mode(const struct domain *d, unsigned int gsi)return vioapic->redirtbl[pin].fields.trig_mode; } -static int ioapic_save (struct domain *d,hvm_domain_context_t *h) +static int ioapic_save (struct vcpu *v,hvm_domain_context_t *h) { +struct domain *d = v->domain;struct hvm_vioapic *s;if ( !has_vioapic (d) )
xen/arch/x86/hvm/viridian.c +11 -19
@@ -990,8 +990,9 @@ out:return HVM_HCALL_completed; } -static int viridian_save_domain_ctxt (struct domain *d,hvm_domain_context_t *h) +static int viridian_save_domain_ctxt (struct vcpu *v,hvm_domain_context_t *h) { +struct domain *d = v->domain;struct hvm_viridian_domain_context ctxt = { .time_ref_count = d->arch.hvm_domain.viridian.time_ref_count.val, .hypercall_gpa = d->arch.hvm_domain.viridian.hypercall_gpa.raw,
@@ -1026,28 +1027,19 @@ static int viridian_load_domain_ctxt(struct domain *d, hvm_domain_context_t *h)HVM_REGISTER_SAVE_RESTORE (VIRIDIAN_DOMAIN , viridian_save_domain_ctxt, viridian_load_domain_ctxt,1 ,HVMSR_PER_DOM ); -static void viridian_save_vcpu_ctxt_one (struct vcpu *v,struct hvm_viridian_vcpu_context *ctxt) +static int viridian_save_vcpu_ctxt_one (struct vcpu *v,hvm_domain_context_t *h ) { - ctxt->vp_assist_msr = v->arch.hvm_vcpu.viridian.vp_assist.msr.raw; - ctxt->vp_assist_pending = v->arch.hvm_vcpu.viridian.vp_assist.pending; -memset (ctxt->_pad,0 ,sizeof (ctxt->_pad)); -} - -static int viridian_save_vcpu_ctxt (struct domain *d,hvm_domain_context_t *h) -{ -struct vcpu *v; +struct domain *d = v->domain; +struct hvm_viridian_vcpu_context ctxt = { + .vp_assist_msr = v->arch.hvm_vcpu.viridian.vp_assist.msr.raw, + .vp_assist_pending = v->arch.hvm_vcpu.viridian.vp_assist.pending, + };if ( !is_viridian_domain (d) )return 0 ; -for_each_vcpu ( d, v ) { -struct hvm_viridian_vcpu_context ctxt; - -viridian_save_vcpu_ctxt_one (v, &ctxt); - -if (hvm_save_entry (VIRIDIAN_VCPU , v->vcpu_id, h, &ctxt) !=0 ) -return 1 ; - } +if (hvm_save_entry (VIRIDIAN_VCPU , v->vcpu_id, h, &ctxt) !=0 ) +return 1 ;return 0 ; }
@@ -1082,7 +1074,7 @@ static int viridian_load_vcpu_ctxt(struct domain *d, hvm_domain_context_t *h)return 0 ; } -HVM_REGISTER_SAVE_RESTORE (VIRIDIAN_VCPU , viridian_save_vcpu_ctxt, +HVM_REGISTER_SAVE_RESTORE (VIRIDIAN_VCPU , viridian_save_vcpu_ctxt_one, viridian_load_vcpu_ctxt,1 ,HVMSR_PER_VCPU );static int __init parse_viridian_version (const char *arg)
xen/arch/x86/hvm/vlapic.c +10 -18
@@ -1435,43 +1435,35 @@ 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 (struct vcpu *v,hvm_domain_context_t *h) { -struct vcpu *v; +struct domain *d = v->domain;struct vlapic *s;int rc =0 ;if ( !has_vlapic (d) )return 0 ; - for_each_vcpu ( d, v ) - { - s =vcpu_vlapic (v); -if ( (rc =hvm_save_entry (LAPIC , v->vcpu_id, h, &s->hw)) !=0 ) -break ; - } + s =vcpu_vlapic (v); + rc =hvm_save_entry (LAPIC , v->vcpu_id, h, &s->hw);return rc; } -static int lapic_save_regs (struct domain *d,hvm_domain_context_t *h) +static int lapic_save_regs (struct vcpu *v,hvm_domain_context_t *h) { -struct vcpu *v; +struct domain *d = v->domain;struct vlapic *s;int rc =0 ;if ( !has_vlapic (d) )return 0 ; - for_each_vcpu ( d, v ) - { -if ( hvm_funcs.sync_pir_to_irr ) - hvm_funcs.sync_pir_to_irr (v); +if ( hvm_funcs.sync_pir_to_irr ) + hvm_funcs.sync_pir_to_irr (v); - s =vcpu_vlapic (v); -if ( (rc =hvm_save_entry (LAPIC_REGS , v->vcpu_id, h, s->regs)) !=0 ) -break ; - } + s =vcpu_vlapic (v); + rc =hvm_save_entry (LAPIC_REGS , v->vcpu_id, h, s->regs);return rc; }
xen/arch/x86/hvm/vpic.c +2 -1
@@ -371,8 +371,9 @@ static int vpic_intercept_elcr_io(return X86EMUL_OKAY ; } -static int vpic_save (struct domain *d,hvm_domain_context_t *h) +static int vpic_save (struct vcpu *v,hvm_domain_context_t *h) { +struct domain *d = v->domain;struct hvm_hw_vpic *s;int i;
xen/include/asm-x86/hvm/save.h +1 -1
@@ -95,7 +95,7 @@ static inline uint16_t hvm_load_instance(struct hvm_domain_context *h)* The save handler may save multiple instances of a type into the buffer; * the load handler will be called once for each instance found when * restoring. Both return non-zero on error. */ -typedef int (*hvm_save_handler ) (struct domain *d, +typedef int (*hvm_save_handler ) (struct vcpu *v,hvm_domain_context_t *h);typedef int (*hvm_load_handler ) (struct domain *d,hvm_domain_context_t *h);
xen/include/asm-x86/hvm/support.h +2 -0
@@ -52,6 +52,8 @@ extern unsigned int opt_hvm_debug_level; #define HVM_DBG_LOG(level, _f, _a...) do {} while (0)#endif +#define CONTINUE 2 +extern unsigned long hvm_io_bitmap[];enum hvm_translation_result {
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH v6 8/8] x86/domctl: Don't pause the whole domain if only getting vcpu state
xen/arch/x86/cpu/mcheck/vmce.c static int vmce_load_vcpu_ctxt(struct domain *d, hvm_domain_context_t *h) · line 384
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 06.06.18 at 14:24, <[email protected]> wrote:
xen/arch/x86/cpu/mcheck/vmce.c +1
-1@@ -394,7 +380,7 @@ static int vmce_load_vcpu_ctxt(struct domain *d, hvm_domain_context_t *h)return err ?:vmce_restore_vcpu (v, &ctxt); } -HVM_REGISTER_SAVE_RESTORE (VMCE_VCPU , vmce_save_vcpu_ctxt, +HVM_REGISTER_SAVE_RESTORE (VMCE_VCPU , vmce_save_vcpu_ctxt_one, vmce_load_vcpu_ctxt,1 ,HVMSR_PER_VCPU );
Also, I'm inclined to say "of course", the functions shouldn't have a _one suffix anymore by the end of this series, possibly even making it unnecessary to touch this and the other similar constructs at all.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH v6 8/8] x86/domctl: Don't pause the whole domain if only getting vcpu state
Quoted 9 lines · Jan Beulich
Quoted 9 lines
Quoted 4 lines
Quoted 4 lines · On 06.06.18 at 14:24, <[email protected]> wrote:
xen/arch/x86/cpu/mcheck/vmce.c +0
-0@@ -394,7 +380,7 @@ static int vmce_load_vcpu_ctxt(struct domain *d, hvm_domain_context_t *h)return err ?:vmce_restore_vcpu (v, &ctxt); }
Quoted 8 lines
xen/arch/x86/cpu/mcheck/vmce.c static int vmce_load_vcpu_ctxt(struct domain *d, hvm_domain_context_t *h) · line 384
Quoted 3 lines
xen/arch/x86/cpu/mcheck/vmce.c +1
-1-HVM_REGISTER_SAVE_RESTORE (VMCE_VCPU , vmce_save_vcpu_ctxt, +HVM_REGISTER_SAVE_RESTORE (VMCE_VCPU , vmce_save_vcpu_ctxt_one, vmce_load_vcpu_ctxt,1 ,HVMSR_PER_VCPU );Also, I'm inclined to say "of course", the functions shouldn't have a
_one
suffix anymore by the end of this series, possibly even making it unnecessary to touch this and the other similar constructs at all.
Ok, I'll fix this in the next version.
Can you give me an insight into how you see the splitting of this patch further?
Thanks,
Alex
________________________
This email was scanned by Bitdefender
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel