qemu-e2k/include/qemu
Peter Maydell 5a358b39f5 hw/display/qxl: Suppress clang-7 warning about misaligned atomic operation
If QEMU is compiled with clang-7 it results in the warning:

hw/display/qxl.c:1884:19: error: misaligned or large atomic operation
may incur significant performance penalty [-Werror,-Watomic-alignment]
    old_pending = atomic_fetch_or(&d->ram->int_pending, le_events);
                  ^

This is because the Spice headers forgot to define the QXLRam struct
with the '__aligned__(4)' attribute.  clang 7 and newer will thus
warn that the access here to int_pending might not be 4-aligned
(because the QXLRam object d->ram points at might start at a
misaligned address).  In fact we set up d->ram in init_qxl_ram() so
it always starts at a 4K boundary, so we know the atomic access here
is OK.

Newer Spice versions (with Spice commit
beda5ec7a6848be20c0cac2a9a8ef2a41e8069c1) will fix the bug;
for older Spice versions, work around it by telling the compiler
explicitly that the alignment is OK using __builtin_assume_aligned().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180927155538.699-1-peter.maydell@linaro.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-10-05 11:21:17 +02:00
..
acl.h
atomic.h util: add atomic64 2018-10-02 18:47:55 +02:00
base64.h
bcd.h
bitmap.h
bitops.h
bswap.h bswap: Add new stn_*_p() and ldn_*_p() memory access functions 2018-06-15 15:23:34 +01:00
buffer.h
compiler.h hw/display/qxl: Suppress clang-7 warning about misaligned atomic operation 2018-10-05 11:21:17 +02:00
config-file.h
coroutine_int.h coroutine: avoid co_queue_wakeup recursion 2018-03-27 13:05:28 +01:00
coroutine.h block: Add missing locking in bdrv_co_drain_bh_cb() 2018-09-25 15:50:15 +02:00
cpuid.h
crc32c.h
cutils.h cutils: Do not include "qemu/units.h" directly 2018-07-02 15:41:17 +02:00
drm.h util: promote qemu_egl_rendernode_open() to libqemuutil 2018-08-27 10:51:44 +02:00
envlist.h
error-report.h qemu-error: make use of {error, warn}_report_once_cond 2018-09-24 17:13:07 +02:00
event_notifier.h
fifo8.h
fifo32.h
fprintf-fn.h
futex.h
hbitmap.h hbitmap: Add @advance param to hbitmap_iter_next() 2018-06-18 17:04:55 +02:00
help_option.h
host-utils.h
id.h
int128.h
iov.h
iova-tree.h util: remove redundant include of glib.h and add osdep.h 2018-06-29 12:22:28 +01:00
jhash.h
job.h blockjob: Lie better in child_job_drained_poll() 2018-09-25 15:50:15 +02:00
lockable.h
log-for-trace.h
log.h tcg: Optionally log FPU state in TCG -d cpu logging 2018-05-15 14:58:44 +01:00
main-loop.h qsp: track BQL callers explicitly 2018-08-23 18:46:25 +02:00
memfd.h hostmem-memfd: add checks before adding hostmem-memfd & properties 2018-10-02 18:47:55 +02:00
mmap-alloc.h
module.h
notify.h
option_int.h
option.h opts: don't silently truncate long option values 2018-05-09 00:13:39 +02:00
osdep.h util: add qemu_write_pidfile() 2018-10-02 18:47:55 +02:00
path.h
pmem.h migration/ram: ensure write persistence on loading all data to PMEM. 2018-08-10 13:29:39 +03:00
processor.h
qdist.h
qht.h qht: constify qht_statistics_init 2018-09-26 08:55:54 -07:00
qsp.h qsp: support call site coalescing 2018-08-23 18:46:25 +02:00
queue.h migration: hold the lock only if it is really needed 2018-08-22 12:36:18 +02:00
range.h
ratelimit.h
rcu_queue.h rcu_queue: add RCU QTAILQ 2018-08-23 18:46:25 +02:00
rcu.h
readline.h
seqlock.h seqlock: add QemuLockable support 2018-08-23 18:46:25 +02:00
sockets.h sockets: move fd_is_socket() into common sockets code 2018-03-13 18:06:06 +00:00
stats64.h
sys_membarrier.h
systemd.h
thread-posix.h qsp: QEMU's Synchronization Profiler 2018-08-23 18:46:25 +02:00
thread-win32.h qsp: QEMU's Synchronization Profiler 2018-08-23 18:46:25 +02:00
thread.h qsp: hide indirect function calls from Coverity 2018-10-02 18:47:55 +02:00
throttle-options.h
throttle.h
timed-average.h
timer.h timer: introduce new virtual clock 2018-10-02 19:08:58 +02:00
typedefs.h typedefs: add QJSON 2018-06-15 14:40:56 +01:00
unicode.h json: Reject invalid UTF-8 sequences 2018-08-24 20:26:37 +02:00
units.h include: Add a lookup table of sizes 2018-10-01 12:51:12 +02:00
uri.h
uuid.h
vfio-helpers.h
win_dump_defs.h dump: move Windows dump structures definitions 2018-10-02 19:09:12 +02:00
xattr.h