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

Re: [Xen-devel] [PATCH v3 07/32] xen/x86: fix arch_set_info_guest for HVM guests



>>> On 03.07.15 at 13:34, <roger.pau@xxxxxxxxxx> wrote:
> --- a/xen/arch/x86/domain.c
> +++ b/xen/arch/x86/domain.c
> @@ -795,6 +795,15 @@ int arch_set_info_guest(
>                c.nat->fs_base || c.nat->gs_base_user)) )
>              return -EINVAL;
>      }
> +    else if ( is_hvm_domain(d) )
> +    {
> +        if ( c(ctrlreg[0]) || c(ctrlreg[1]) || c(ctrlreg[2]) ||
> +             c(ctrlreg[3]) || c(ctrlreg[4]) || c(ctrlreg[5]) ||
> +             c(ctrlreg[6]) || c(ctrlreg[7]) || c(ldt_base) ||
> +             c(ldt_ents) || c(kernel_ss) || c(kernel_sp) ||
> +             c(gdt_ents) )
> +            return -EINVAL;
> +    }

In addition to what Andrew said - is the use of c() here really correct
considering

    compat = is_pv_32bit_domain(d);

#define c(fld) (compat ? (c.cmp->fld) : (c.nat->fld))

near the beginning of the function?

Jan


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


 


Rackspace

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