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

Re: [Xen-devel] [PATCH] x86/MCE: sanitize domain/vcpu ID handling



On 23/02/17 09:28, Jan Beulich wrote:
> Storing -1 into both fields was misleading consumers: We really should
> have a manifest constant for "invalid vCPU" here, and the already
> existing DOMID_INVALID should be used.
>
> Also correct a bogus (dead code) check in mca_init_global(), at once
> introducing a manifest constant for the early boot "invalid vCPU"
> pointer (avoiding proliferation of the open coding). Make that pointer
> a non-canonical address at once.
>
> Finally, don't leave mc_domid uninitialized in mca_init_bank().
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, however...

> ---
> TBD: Do we need to change XEN_MCA_INTERFACE_VERSION due to the 0xffff
>      -> DOMID_INVALID change for what mc_domid defaults to?
>
> --- a/xen/arch/x86/cpu/mcheck/mcaction.c
> +++ b/xen/arch/x86/cpu/mcheck/mcaction.c
> @@ -100,7 +100,8 @@ mc_memerr_dhandler(struct mca_binfo *bin
>                      goto vmce_failed;
>                  }
>  
> -                if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL )
> +                if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL ||
> +                    global->mc_vcpuid == XEN_MC_VCPUID_INVALID)

Isn't this a backwards step, style-wise?  This file, using 4 spaces, is
Xen style rather than Linux style.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.