lkml.org 
[lkml]   [2015]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/25] x86, pkey: add PKRU xsave fields and data structure(s)
On Mon, 28 Sep 2015, Dave Hansen wrote:
> +/*
> + * State component 9: 32-bit PKRU register.
> + */
> +struct pkru {
> + u32 pkru;
> +} __packed;
> +
> +struct pkru_state {
> + union {
> + struct pkru pkru;
> + u8 pad_to_8_bytes[8];
> + };

Why do you need two structs?

struct pkru_state {
u32 pkru;
u32 pad;
}

should be sufficient. So instead of

xsave.pkru_state.pkru.pkru

you get the more obvious

xsave.pkru_state.pkru

Hmm?

Thanks,

tglx








\
 
 \ /
  Last update: 2015-10-01 14:01    [W:0.602 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site