>>> On 27.05.16 at 14:13, <haozhong.zh...@intel.com> wrote:
> --- a/tools/tests/mce-test/tools/xen-mceinj.c
> +++ b/tools/tests/mce-test/tools/xen-mceinj.c
> @@ -317,7 +317,9 @@ static int inject_mci_addr(xc_interface *xc_handle,
>                             domid_t domid)
>  {
>      return add_msr_bank_intpose(xc_handle, cpu_nr,
> -                                MC_MSRINJ_F_INTERPOSE | MC_MSRINJ_F_GPADDR,
> +                                MC_MSRINJ_F_INTERPOSE |
> +                                (domid > DOMID_FIRST_RESERVED ?

Simply by the name of it I would say this ought to be >=. However,
DOMID_FIRST_RESERVED == DOMID_SELF, so the > seems right
here (on the hypervisor side it should be changed though). But for
clarity I would suggest either adding a respective comment or
indeed using

        domid >= DOMID_FIRST_RESERVED && domid != DOMID_SELF

(which I would hope the compiler can fold).

Jan


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

Reply via email to