All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 2/6] x86/cpuid: Introduce recalculate_xstate()
Date: Mon, 16 Jan 2017 10:09:43 -0700	[thread overview]
Message-ID: <587D0C670200007800130A0E@prv-mh.provo.novell.com> (raw)
In-Reply-To: <0af7c8ab-3e5f-0f72-d5e9-0e1aafeed530@citrix.com>

>>> On 16.01.17 at 18:02, <andrew.cooper3@citrix.com> wrote:
> On 16/01/17 16:45, Jan Beulich wrote:
>>>>> On 16.01.17 at 12:40, <andrew.cooper3@citrix.com> wrote:
>>> @@ -154,6 +152,13 @@ struct cpuid_policy
>>>              };
>>>              uint32_t /* b */:32, xss_low, xss_high;
>>>          };
>>> +
>>> +        /* Per-component common state.  Valid for i >= 2. */
>>> +        struct {
>>> +            uint32_t size, offset;
>>> +            bool xss:1, align:1;
>>> +            uint32_t /* c */:30, /* d */:32;
>>> +        } comp[CPUID_GUEST_NR_XSTATE];
>> Hmm, can we rely on this functioning on varying complier variants?
>> I think the standard doesn't exclude a uint32_t type bitfield to
>> start on a 4-byte boundary if not following another uint32_t one.
>> IOW I think we'd be better off giving the same type to all fields we
>> want to share a storage unit.
> 
> Hmm.  In this case, something like:
> 
> bool xss:1, align:1;
> uint32_t _res_d;
> 
> ought to work.

In a union you mean? Yes.

Jan


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

  reply	other threads:[~2017-01-16 17:09 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16 11:40 [PATCH 0/6] Further CPUID improvements Andrew Cooper
2017-01-16 11:40 ` [PATCH 1/6] x86/xstate: Fix array overrun on hardware with LWP Andrew Cooper
2017-01-16 16:26   ` Jan Beulich
2017-01-16 11:40 ` [PATCH 2/6] x86/cpuid: Introduce recalculate_xstate() Andrew Cooper
2017-01-16 16:45   ` Jan Beulich
2017-01-16 17:02     ` Andrew Cooper
2017-01-16 17:09       ` Jan Beulich [this message]
2017-01-17 11:27   ` [PATCH v2 " Andrew Cooper
2017-01-17 12:52     ` Jan Beulich
2017-01-17 15:15       ` Andrew Cooper
2017-01-17 15:28         ` Jan Beulich
2017-01-17 15:30           ` Andrew Cooper
2017-01-16 11:40 ` [PATCH 3/6] x86/cpuid: Move all xstate leaf handling into guest_cpuid() Andrew Cooper
2017-01-16 16:58   ` Jan Beulich
2017-01-16 17:07     ` Andrew Cooper
2017-01-16 11:40 ` [PATCH 4/6] tools/libxc: Remove xsave calculations from libxc Andrew Cooper
2017-01-16 11:44   ` Wei Liu
2017-01-16 11:40 ` [PATCH 5/6] x86/cpuid: Don't offer HVM hypervisor leaves to PV guests Andrew Cooper
2017-01-16 17:02   ` Jan Beulich
2017-01-17 11:01     ` Andrew Cooper
2017-01-16 11:40 ` [PATCH 6/6] x86/cpuid: Offer ITSC to domains which are automatically non-migrateable Andrew Cooper
2017-01-16 17:07   ` Jan Beulich
2017-01-16 17:26     ` Andrew Cooper
2017-01-17  9:00       ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=587D0C670200007800130A0E@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.