>>> On 28.06.18 at 11:25, <[email protected]> wrote:
> --- a/xen/arch/x86/cpu/mcheck/vmce.c
> +++ b/xen/arch/x86/cpu/mcheck/vmce.c
> @@ -349,6 +349,20 @@ int vmce_wrmsr(uint32_t msr, uint64_t val)
> return ret;
> }
>
> +static int vmce_save_vcpu_ctxt_one(struct vcpu *v, hvm_domain_context_t *h)
> + {
> + 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;
> +
> + if ( hvm_save_entry(VMCE_VCPU, v->vcpu_id, h, &ctxt) != 0 )
> + return 1;
Afaict hvm_save_entry() can return 0 and -1 at present. You convert
this to 1 here. Can you please simply hand through return values, so
that if hvm_save_entry() ever obtains a new possible return value,
this will be handed through find without having to touch unrelated code?
> + return 0;
I don't understand anyway why you didn't pick the simpler
return hvm_save_entry(VMCE_VCPU, v->vcpu_id, h, &ctxt);
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel