improve emulation correctness
A message that is not in the archive (sent off-list or not yet received): [email protected]
On Thu, Apr 24, 2014 at 12:35:24PM +0400, poletaev wrote:
The commit message is vague so I guess the maintainers skipped your email. I have CCed Paolo, Richard, and Andreas who may be able to review and apply your patch.
Please make the commit message more specific:
target-i386: don't touch undefined OF flag in RCL instruction
That way the relevant people can easily identify it on the mailing list and will review your patch.
Quoted 9 lines
There is a set of test, that checks QEMU CPU for similar behavior with real hardware (http://roberto.greyhats.it/projects/pills.html). Test
reg/pill2579.ccan detect, that program is execute in emulated environment. It is related with behavior of rcl instruction. If the number of shifted bits more than 1, OF of eflags become undefined. Real CPUs does not change OF, if it is undefined. QEMU do it anyway.Emulated program can execute that test and after that can understand environment not real.
It will always be possible to tell the environment is virtual. There are too many quirks that are very hard to hide - timing, firmware, etc.
But I checked the Intel Software Developer's Manual and your patch matches how they document the effect of the RCL instruction. Whether *all* Intel, AMD, VIA, etc x86 CPUs leave the OF flag alone, I'm not sure but I think this patch won't hurt.
Quoted 10 lines
Signed-off-by Dmitry Poletaev <[email protected]>target-i386/shift_helper_template.h +0
-0index cf91a2d..d5bd321 100644
---
a/target-i386/shift_helper_template.h
This patch email is broken. Please use git-send-email(1) to send properly formatted patches.
Quoted 7 lines · poletaev
There is a set of test, that checks QEMU CPU for similar behavior with real hardware (http://roberto.greyhats.it/projects/pills.html). Test
reg/pill2579.ccan detect, that program is execute in emulated environment. It is related with behavior of rcl instruction. If the number of shifted bits more than 1, OF of eflags become undefined. Real CPUs does not change OF, if it is undefined. QEMU do it anyway.
Quoted 6 lines
Emulated program can execute that test and after that can understand environment not real.
Signed-off-by Dmitry Poletaev <[email protected]>
I see you resent the patch and it received attention the second time :).
Stefan
Thank you for attention :)
This patch not needed, according to QEMU dev policy, and so I will not sent it any more.
I found another defect, and it not related with undefined flags.
-----Original Message-----
From: Stefan Hajnoczi [mailto:[email protected]]
Sent: Friday, May 02, 2014 1:09 PM
To: poletaev
Cc: [email protected]
Subject: Re: [Qemu-devel] [PATCH] improve emulation correctness
Quoted 3 lines · poletaev
There is a set of test, that checks QEMU CPU for similar behavior with real hardware (http://roberto.greyhats.it/projects/pills.html). Test
reg/pill2579.ccan detect, that program is execute in emulated
environment.
Quoted 10 lines
It is related with behavior of rcl instruction. If the number of shifted bits more than 1, OF of eflags become undefined. Real CPUs does not change OF, if it is undefined. QEMU do it anyway.
Emulated program can execute that test and after that can understand environment not real.
Signed-off-by Dmitry Poletaev <[email protected]>
I see you resent the patch and it received attention the second time :).
Stefan