Qemu does not force SSE data alignment

Bug #1699567 reported by Anatol Pomozov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
QEMU
Expired
Undecided
Unassigned

Bug Description

I have an OS that tries to use SSE operations. It works fine in qemu. But it crashes when I try to run the OS at the host cpu using KVM.

The instruction that crahes with #GP(0) is
 movaps ADDR,%xmm0

The documentation says ADDR has to be 16-bytes alignment otherwise #GP is generated. And indeed the problem was with the data alignment. After adjusting it at my side the OS works fine both with Qemu and KVM.

It would be great if QEMU followed specification more closely and forced SSE data alignment requirements. It will help to catch alignment issues early and debug it easier.

$ qemu-system-x86_64 -version
QEMU emulator version 2.9.50 (v2.9.0-1363-g95eef1c68b)
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

Revision history for this message
Thomas Huth (th-huth) wrote :

The QEMU project is currently considering to move its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting older bugs to "Incomplete" now.
If you still think this bug report here is valid, then please switch the state back to "New" within the next 60 days, otherwise this report will be marked as "Expired". Thank you and sorry for the inconvenience.

Changed in qemu:
status: New → Incomplete
Revision history for this message
Daniel Bokser (danb91) wrote :

I am currently running into this bug on QEMU emulator version 5.1.0.
movaps unaligned access works fine in qemu, when it should throw a GP. Likewise, the same code on physical hardware throws a GP.

Daniel Bokser (danb91)
Changed in qemu:
status: Incomplete → New
Revision history for this message
Richard Henderson (rth) wrote :

Yep. Long-standing bug.

Changed in qemu:
status: New → Confirmed
Revision history for this message
Thomas Huth (th-huth) wrote : Moved bug report

This is an automated cleanup. This bug report has been moved to QEMU's
new bug tracker on gitlab.com and thus gets marked as 'expired' now.
Please continue with the discussion here:

 https://gitlab.com/qemu-project/qemu/-/issues/217

Changed in qemu:
status: Confirmed → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.