xemu/hw/display
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
..
ads7846.c ssi: change ssi_slave_init to be a realize ops 2016-07-04 13:15:22 +01:00
bcm2835_fb.c hw/display/bcm2835_fb: Validate bcm2835_fb_mbox_push() config 2018-08-24 13:17:50 +01:00
blizzard.c Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
bochs-display.c * IEC units series (Philippe) 2018-07-02 19:07:19 +01:00
cg3.c fix "Missing break in switch" coverity reports 2018-08-23 13:32:50 +02:00
cirrus_vga_rop2.h cirrus: fix PUTPIXEL macro 2017-03-27 12:14:45 +02:00
cirrus_vga_rop.h cirrus: fix off-by-one in cirrus_bitblt_rop_bkwd_transp_*_16 2017-03-17 10:23:44 +01:00
cirrus_vga.c fix "Missing break in switch" coverity reports 2018-08-23 13:32:50 +02:00
dpcd.c maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
edid-generate.c display/edid: add qemu_edid_size() 2018-09-27 08:07:51 +02:00
edid-region.c display/edid: add region helper. 2018-09-27 08:07:51 +02:00
exynos4210_fimd.c use dpy_gfx_update_full 2018-08-30 13:24:13 +02:00
framebuffer.c memory: hide memory_region_sync_dirty_bitmap behind DirtyBitmapSnapshot 2018-02-13 16:15:09 +01:00
framebuffer.h framebuffer: set DIRTY_MEMORY_VGA on RAM that is used for the framebuffer 2015-07-24 13:57:45 +02:00
g364fb.c use dpy_gfx_update_full 2018-08-30 13:24:13 +02:00
jazz_led.c use dpy_gfx_update_full 2018-08-30 13:24:13 +02:00
Makefile.objs display/edid: add region helper. 2018-09-27 08:07:51 +02:00
milkymist-tmu2.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
milkymist-vgafb_template.h milkymist-vgafb: swap pixel data in source buffer 2014-02-04 19:34:30 +01:00
milkymist-vgafb.c milkymist: update specification URLs 2016-06-20 18:12:04 +02:00
omap_dss.c Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
omap_lcd_template.h omap_lcdc: Remove support for DEPTH != 32 2016-05-12 13:22:24 +01:00
omap_lcdc.c omap_lcdc: Remove support for DEPTH != 32 2016-05-12 13:22:24 +01:00
pl110_template.h display: avoid multi-statement macro 2014-01-31 14:47:33 +00:00
pl110.c pl110: Implement vertical compare/next base interrupts 2018-01-25 11:45:30 +00:00
pxa2xx_lcd.c Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
pxa2xx_template.h display: avoid multi-statement macro 2014-01-31 14:47:33 +00:00
qxl-logger.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
qxl-render.c qxl: support mono cursors with inverted colors 2018-09-27 08:10:07 +02:00
qxl.c hw/display/qxl: Suppress clang-7 warning about misaligned atomic operation 2018-10-05 11:21:17 +02:00
qxl.h qxl: use guest_monitor_config for local renderer. 2018-09-27 08:08:07 +02:00
ramfb-standalone.c hw/display: add standalone ramfb device 2018-06-18 11:22:15 +02:00
ramfb.c ramfb: enable vgabios 2018-07-02 17:21:52 +02:00
sii9022.c hw/sii9022: Add support for Silicon Image SII9022 2018-03-01 11:13:36 +00:00
sm501_template.h sm501: Misc clean ups 2017-04-24 12:32:12 +01:00
sm501.c sm501: Adjust endianness of pixel value in rectangle fill 2018-09-25 11:12:25 +10:00
ssd0303.c hw/i2c: Use DeviceClass::realize instead of I2CSlaveClass::init 2018-06-01 15:14:31 +02:00
ssd0323.c vmstateify ssd0323 display 2016-09-22 18:13:08 +01:00
tc6393xb_template.h display: avoid multi-statement macro 2014-01-31 14:47:33 +00:00
tc6393xb.c use dpy_gfx_update_full 2018-08-30 13:24:13 +02:00
tcx.c memory: hide memory_region_sync_dirty_bitmap behind DirtyBitmapSnapshot 2018-02-13 16:15:09 +01:00
trace-events hw/sii9022: Add support for Silicon Image SII9022 2018-03-01 11:13:36 +00:00
vga_int.h display/stdvga: add edid support. 2018-09-27 08:07:51 +02:00
vga_regs.h hw/display/vga: "vga.h" only contains registers defs, rename it "vga_regs.h" 2017-12-18 17:07:02 +03:00
vga-helpers.h vga: stop passing pointers to vga_draw_line* functions 2017-09-01 13:52:43 +02:00
vga-isa-mm.c hw/display/vga-isa-mm: Convert away from old_mmio 2018-08-21 09:52:22 +02:00
vga-isa.c vga: disable global_vmstate for 3.0+ machine types 2018-07-03 11:19:49 +02:00
vga-pci.c display/stdvga: add edid support. 2018-09-27 08:07:51 +02:00
vga.c use dpy_gfx_update_full 2018-08-30 13:24:13 +02:00
virtio-gpu-3d.c virtio-gpu: pass down VirtIOGPU pointer to a bunch of functions 2018-09-03 08:31:50 +02:00
virtio-gpu-pci.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
virtio-gpu.c virtio-gpu: add iommu support 2018-09-03 08:31:57 +02:00
virtio-vga.c display/stdvga: add edid support. 2018-09-27 08:07:51 +02:00
vmware_vga.c use dpy_gfx_update_full 2018-08-30 13:24:13 +02:00
xenfb.c hw/display: Use the IEC binary prefix definitions 2018-07-02 15:41:13 +02:00
xlnx_dp.c use dpy_gfx_update_full 2018-08-30 13:24:13 +02:00