* ctfconvert problems with build on illumos based platform
@ 2014-01-14 20:38 Igor Kozhukhov
2014-01-14 20:46 ` Andrew Cooper
0 siblings, 1 reply; 5+ messages in thread
From: Igor Kozhukhov @ 2014-01-14 20:38 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 350 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 1401 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: ctfconvert problems with build on illumos based platform
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
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cooper @ 2014-01-14 20:46 UTC (permalink / raw)
To: Igor Kozhukhov; +Cc: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 575 bytes --]
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.
~Andrew
[-- Attachment #1.2: Type: text/html, Size: 2223 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: ctfconvert problems with build on illumos based platform
2014-01-14 20:46 ` Andrew Cooper
@ 2014-01-14 20:52 ` Igor Kozhukhov
2014-01-14 20:58 ` Andrew Cooper
0 siblings, 1 reply; 5+ messages in thread
From: Igor Kozhukhov @ 2014-01-14 20:52 UTC (permalink / raw)
To: Andrew Cooper; +Cc: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 760 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 4039 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: ctfconvert problems with build on illumos based platform
2014-01-14 20:52 ` Igor Kozhukhov
@ 2014-01-14 20:58 ` Andrew Cooper
2014-01-15 9:44 ` Ian Campbell
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cooper @ 2014-01-14 20:58 UTC (permalink / raw)
To: Igor Kozhukhov; +Cc: xen-devel
[-- 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
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: ctfconvert problems with build on illumos based platform
2014-01-14 20:58 ` Andrew Cooper
@ 2014-01-15 9:44 ` Ian Campbell
0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2014-01-15 9:44 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Igor Kozhukhov, xen-devel
On Tue, 2014-01-14 at 20:58 +0000, Andrew Cooper wrote:
> 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.
The pointer-trickery will need updating at the same time then, that's
not rocket science and the use of a single char array is the normal
portable way to do these sorts of variable length suffixes to structs.
Ian.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-01-15 9:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2014-01-15 9:44 ` Ian Campbell
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.