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

Re: [Xen-devel] [PATCH v2 5/5] x86: Reorganise and rename debug register fields in struct vcpu



>>> On 15.10.18 at 12:36, <andrew.cooper3@xxxxxxxxxx> wrote:
> @@ -970,9 +972,13 @@ int arch_set_info_guest(
>      v->arch.pv.ctrlreg[4] = cr4 ? pv_guest_cr4_fixup(v, cr4) :
>          real_cr4_to_pv_guest_cr4(mmu_cr4_features);
>  
> -    memset(v->arch.debugreg, 0, sizeof(v->arch.debugreg));
> -    for ( i = 0; i < 8; i++ )
> -        (void)set_debugreg(v, i, c(debugreg[i]));
> +    memset(v->arch.dr, 0, sizeof(v->arch.dr));
> +    v->arch.dr6 = v->arch.dr7 = v->arch.pv.dr7_emul = 0;

Considering your earlier change to correct initial values, wouldn't
it be better to use the (non-zero) default values here too, even
if due to ...

> +    for ( i = 0; i < ARRAY_SIZE(v->arch.dr); i++ )
> +        set_debugreg(v, i, c(debugreg[i]));
> +    set_debugreg(v, 6, c(debugreg[6]));
> +    set_debugreg(v, 7, c(debugreg[7]));

... this doing so might be benign at this point in time?

With or without this adjustment
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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