[PATCH xserver] On x86 targets, turn off SSE instructions for SlowBcopy

Jonathan A. Kollasch jakllsch at kollasch.net
Mon Jul 31 01:30:48 UTC 2017


On Sun, Jul 30, 2017 at 08:49:49PM +0200, Dimitry Andric wrote:
> Some compilers (e.g. clang) will recognize the memcpy idiom in
> xf86SlowBcopy(), and optimize it into a loop using SSE instructions.
> This can cause "Illegal instruction" crashes under virtualization
> environments such as qemu/kvm.
> 
> To prevent this, explicitly turn off SSE for SlowBcopy.c, when compiling
> for an x86 target.

This seems like the wrong way to fix this.  If the platform doesn't
support these instructions the compiler should not be configured to emit
them by default.  Unless we're explicitly enabling SSE, it's not our
responsibility to disable it in certain places.

	Jonathan Kollasch


More information about the xorg-devel mailing list