On 2015-12-03 at 15:36 'Davide Libenzi' via Akaros wrote:
> > @@ -23,20 +23,20 @@ struct hw_trapframe {
> > uint64_t tf_r14;
> > uint64_t tf_r15;
> > uint32_t tf_trapno;
> > - uint32_t tf_padding5;
> > + uint32_t tf_padding5; /* used in trap reflection
> > */ /* below here defined by x86 hardware (error code optional) */
> > uint32_t tf_err;
> > - uint32_t tf_padding4;
> > + uint32_t tf_padding4; /* used in trap reflection
> > */ uint64_t tf_rip;
> > uint16_t tf_cs;
> > - uint16_t tf_padding3;
> > + uint16_t tf_padding3; /* used in trap reflection
> > */ uint32_t tf_padding2;
> > uint64_t tf_rflags;
> > /* unlike 32 bit, SS:RSP is always pushed, even when not
> > changing rings */
> > uint64_t tf_rsp;
> > uint16_t tf_ss;
> > uint16_t tf_padding1;
> > - uint32_t tf_padding0;
> > + uint32_t tf_padding0; /* used for partial
> > contexts */
>
> Why not give these "padding" a name which tells their use?
I thought about it, but opted to leave the names as is, since the
format for the TF is defined by the hardware (mostly) and since some of
the padding uses aren't exposed to userspace (such as partial
contexts). Neither way (renaming the fields or not) seemed
particularly right or wrong to me.
Barret
--
You received this message because you are subscribed to the Google Groups
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.