Re: [PATCH spice-protocol] qxl_dev: Align QXLRam to 4 bytes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> On Thu, Jun 28, 2018 at 09:43:47PM +0100, Frediano Ziglio wrote:
> > This avoids compilers detect misaligned access.
> 
> Maybe "This helps some compilers to realize QXLRam is correctly aligned"?
> 

Well, the current code tells the compiler that this structure
is NOT aligned.
But we actually know the opposite and this helps the compiler
in some atomic operations (actually clang has issues with Intel
which works but in theory one could use with another processor
to emulate a x86/x64 machine).
(explanation to helps other people came out with a better comment).

> 
> > The structure is allocated at the beginning of a page so surely
> > will be 4 bytes aligned.
> 
> Not immediatly obvious in qemu, need to go through some indirections,
> but the struct indeed seems 4kB aligned.
> 
> Christophe
> 

Was proposed to put 4kb alignment but this also changes the size
of the structure, as this maybe a possible temporary solution is
better to not break the ABI.

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]