Re: [Qemu-devel] [PATCH] improve emulation correctness

2014-05-06 Thread poletaev
: poletaev Cc: qemu-devel@nongnu.org Subject: Re: [Qemu-devel] [PATCH] improve emulation correctness On Thu, Apr 24, 2014 at 12:35:24PM +0400, poletaev wrote: > There is a set of test, that checks QEMU CPU for similar behavior with > real hardware (http://roberto.greyhats.it/projects/pill

Re: [Qemu-devel] [PATCH] improve emulation correctness

2014-05-02 Thread Stefan Hajnoczi
On Thu, Apr 24, 2014 at 12:35:24PM +0400, poletaev wrote: > 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.c can detect, that program is execute in emulated environment. > It is related wit

Re: [Qemu-devel] [PATCH] improve emulation correctness

2014-05-02 Thread Stefan Hajnoczi
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 und

Re: [Qemu-devel] [PATCH] improve emulation correctness

2014-04-28 Thread Richard Henderson
On 04/28/2014 07:32 AM, Dmitry Poletaev wrote: > I'm understand your position. > > But why in TCG undefined flags obviously change to zero in some cases? > For example: > af = 0; /* undefined */ > > It is not a part of Intel specification, what reason was apply that > convention? Because it's

Re: [Qemu-devel] [PATCH] improve emulation correctness

2014-04-28 Thread Richard Henderson
On 04/28/2014 06:05 AM, Dmitry Poletaev wrote: > -env->cc_src = (eflags & ~(CC_C | CC_O)) | > -(lshift(src ^ t0, 11 - (DATA_BITS - 1)) & CC_O) | > +env->cc_src = (eflags & ~CC_C) | > ((src >> (DATA_BITS - count)) & CC_C); > +if (count == 1) { > +

Re: [Qemu-devel] [PATCH] improve emulation correctness

2014-04-28 Thread Dmitry Poletaev
I'm understand your position. But why in TCG undefined flags obviously change to zero in some cases? For example: af = 0; /* undefined */ It is not a part of Intel specification, what reason was apply that convention? 28.04.2014, 17:49, "Peter Maydell" : > On 28 April 2014 14:41, Dmitry Poleta

Re: [Qemu-devel] [PATCH] improve emulation correctness

2014-04-28 Thread Peter Maydell
On 28 April 2014 14:41, Dmitry Poletaev wrote: > Let's imagine we analyse a program(may be a malware) and so > run it in emulator. Malware can execute that test and understand > that it run in an emulator. After that malware can make decision, > that someone analyse it and alter its behavior with

Re: [Qemu-devel] [PATCH] improve emulation correctness

2014-04-28 Thread Dmitry Poletaev
27.04.2014, 20:59, "Peter Maydell" : >  On 27 April 2014 17:46, Michael Tokarev wrote: >>   25.04.2014 21:24, Peter Maydell wrote: >>>   It is always going to be possible to determine that you're >>>   running on an emulator rather than real hardware, so changing >>>   QEMU behaviour just for thi

Re: [Qemu-devel] [PATCH] improve emulation correctness

2014-04-28 Thread Dmitry Poletaev
25.04.2014, 21:09, "Richard Henderson" : >  On 04/25/2014 01:13 AM, Dmitry Poletaev wrote: >>   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.c can detect, that program is execute in

Re: [Qemu-devel] [PATCH] improve emulation correctness

2014-04-27 Thread Peter Maydell
On 27 April 2014 17:46, Michael Tokarev wrote: > 25.04.2014 21:24, Peter Maydell wrote: >> It is always going to be possible to determine that you're >> running on an emulator rather than real hardware, so changing >> QEMU behaviour just for this is uninteresting. If QEMU >> behaves differently fr

Re: [Qemu-devel] [PATCH] improve emulation correctness

2014-04-27 Thread Michael Tokarev
25.04.2014 21:24, Peter Maydell wrote: > On 25 April 2014 09:13, Dmitry Poletaev wrote: > >> Emulated program can execute that test and after that >> can understand environment not real. > > It is always going to be possible to determine that you're > running on an emulator rather than real hard

Re: [Qemu-devel] [PATCH] improve emulation correctness

2014-04-25 Thread Eric Blake
On 04/24/2014 02:35 AM, poletaev wrote: > 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.c can detect, that program is execute in emulated environment. > It is related with behavior of rcl

Re: [Qemu-devel] [PATCH] improve emulation correctness

2014-04-25 Thread Peter Maydell
On 25 April 2014 09:13, Dmitry Poletaev wrote: > 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.c can detect, that program is execute in emulated environment. > It is related with behav

[Qemu-devel] [PATCH] improve emulation correctness

2014-04-25 Thread 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.c can detect, that program is execute in emulated environment. It is related with behavior of rcl instruction. If the number of shifted bits more

Re: [Qemu-devel] [PATCH] improve emulation correctness

2014-04-25 Thread Richard Henderson
On 04/25/2014 01:13 AM, Dmitry Poletaev wrote: > 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.c can detect, that program is execute in emulated environment. > It is related with behavi

[Qemu-devel] [PATCH] improve emulation correctness

2014-04-25 Thread Dmitry 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.c can detect, that program is execute in emulated environment. It is related with behavior of rcl instruction. If the number of shifted bits mo