Public bug reported:
Consider the attached C file, which does a read-modify-write of the form
`add [mem], reg`, where `mem` points to a non-present page. In the
resulting page fault, the W/R bit is not set, while real hardware does
set this bit.
% gcc -m32 qemu-bug1.c&& ./a.out && qemu-i386 ./a.o
Public bug reported:
In TCG mode, when a 16-byte write instruction (such as movdqu) is
executed at a page boundary and causes a page fault, a partial write is
executed in the first page. See the attached code for an example.
Tested on the qemu-3.0.0-rc1 release.
% gcc -m32 qemu-bug2.c && ./a.out