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

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



>>> On 06.06.18 at 17:21, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 06/06/18 16:00, Jan Beulich wrote:
>>>>> On 04.06.18 at 15:59, <andrew.cooper3@xxxxxxxxxx> wrote:
>>> @@ -518,7 +524,10 @@ struct arch_vcpu
>>>      void              *fpu_ctxt;
>>>      unsigned long      vgc_flags;
>>>      struct cpu_user_regs user_regs;
>>> -    unsigned long      debugreg[8];
>>> +
>>> +    /* Debug registers. */
>>> +    unsigned long dr[4];
>>> +    unsigned long dr6, dr7;
>> Since you make the last two separate fields, and since their upper
>> 32 bits are reserved-zero, why not make them uint32_t, just like
>> dr7_emul is?
> 
> Because __vmread() takes unsigned long *.
> 
> I did initially make them uint32_t, then had the compiler complain at
> me.  I indented to leave a note in the commit message, but I forgot.  Sorry.

That's for dr7 only, then. dr6 and dr7_emul could then share the other
64-bit slot.

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®.