All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Igor Kozhukhov <ikozhukhov@gmail.com>
Cc: xen-devel@lists.xen.org
Subject: Re: ctfconvert problems with build on illumos based platform
Date: Tue, 14 Jan 2014 20:58:11 +0000	[thread overview]
Message-ID: <52D5A4E3.1080405@citrix.com> (raw)
In-Reply-To: <EE36B3F3-39A2-484E-8869-AF51C72DFBD9@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1238 bytes --]

On 14/01/14 20:52, Igor Kozhukhov wrote:
>
> On Jan 15, 2014, at 12:46 AM, Andrew Cooper wrote:
>
>> On 14/01/14 20:38, Igor Kozhukhov wrote:
>>> Hello All,
>>>
>>> I have problems with ctfconvert with build sources of xen-4.2 on
>>> illumos based platform:
>>> https://www.illumos.org/issues/3205
>>>
>>> could you please let me know - what the reason to have a variable in
>>> structure 'struct hvm_hw_cpu_xsave'  with zero size:
>>> struct { char x[0]; } ymm;    /* YMM */
>>> --
>>> Best regards,
>>> Igor Kozhukhov
>>>
>>>
>>
>> The structure is variable length depending on whether the VM has
>> enabled AVX support.
>>
>> It is rather unfortunate that we have non-complient C used to specify
>> the ABI.
>
> can we use here ?
> struct { char x[1]; } ymm;
>
> it will fix my problem.
>
> -Igor
>

No, it wont.

The 'ymm' is either not present and has a size of 0 as far as save_area
is concerned, or is present, and has a size of 16 * 256bit registers.

The content of this structure is only relevant as far as
hvm_{save,load}_cpu_xsave_states() goes, which resorts to some
pointer-trickary to move the data.  Changing that char x[0] to char x[1]
will break the pointer trickary, and migration will suffer an ABI breakage.

~Andrew

[-- Attachment #1.2: Type: text/html, Size: 5555 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

  reply	other threads:[~2014-01-14 20:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-14 20:38 ctfconvert problems with build on illumos based platform Igor Kozhukhov
2014-01-14 20:46 ` Andrew Cooper
2014-01-14 20:52   ` Igor Kozhukhov
2014-01-14 20:58     ` Andrew Cooper [this message]
2014-01-15  9:44       ` Ian Campbell

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=52D5A4E3.1080405@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=ikozhukhov@gmail.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.