[Qemu-devel] [PATCH] Fix wrong behavior of cpu_memory_rw_debug() function in SMM

2019-09-18 Thread Dmitry Poletaev
dle access properly. Here the patch to fix it. Signed-off-by: Dmitry Poletaev --- target/i386/cpu.c| 2 +- target/i386/cpu.h| 3 ++- target/i386/helper.c | 5 - 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 9e0bac31e8..8ade4ed2c6 10

[Qemu-devel] Can not read SMI handler code with cpu_memory_rw_debug while in SMM

2019-08-28 Thread poletaev
I am using OVMF2018 (https://github.com/tianocore/tianocore.github.io/wiki/OVMF) build with smm functionality. Run qemu with "-machine smm=on" option. When SMI handler starts working, cpu_memory_rw_debug() function reads from tseg_blackhole device mem and function returns ... instead of actu

[Qemu-devel] vmx support for qemu

2016-10-26 Thread poletaev
.com/ispras/qemu.git , branch vmx. Best regards, Dmitry Poletaev.

Re: [Qemu-devel] [PATCH v2] target-i386: fix iret emulation correctness

2016-07-12 Thread poletaev
ping Best regards, Dmitry Poletaev. From: poletaev [mailto:dmitry.polet...@ispras.ru] Sent: Tuesday, June 07, 2016 5:12 PM To: 'qemu-devel@nongnu.org' Cc: 'pavel.dovga...@ispras.ru' Subject: [PATCH v2] target-i386: fix iret emulation correctness From: Dmitr

Re: [Qemu-devel] [PATCH v2] target-i386: fix iret emulation correctness

2016-06-22 Thread poletaev
ping Best regards, Dmitry Poletaev. From: poletaev [mailto:dmitry.polet...@ispras.ru] Sent: Tuesday, June 07, 2016 5:12 PM To: 'qemu-devel@nongnu.org' Cc: 'pavel.dovga...@ispras.ru' Subject: [PATCH v2] target-i386: fix iret emulation correctness From: Dmitr

[Qemu-devel] [PATCH v2] target-i386: fix iret emulation correctness

2016-06-07 Thread poletaev
From: Dmitry Poletaev Subject: [PATCH v2] target-i386: fix iret emulation correctness According to Intel manual: "If the NMI handler is a virtual-8086 task with an IOPL of less than 3, an IRET instruction issued from the handler generates a general-protection exception, the NMI is unm

Re: [Qemu-devel] [PATCH] target-i386: fix iret emulation correctness

2016-06-07 Thread poletaev
c - s->cs_base)); set_cc_op(s, CC_OP_EFLAGS); } gen_eob(s); break; Best regards, Dmitry Poletaev.

[Qemu-devel] [PATCH] target-i386: fix iret emulation correctness

2016-06-07 Thread poletaev
From: Dmitry Poletaev Subject: [PATCH] target-i386: fix iret emulation correctness Signed-off-by: Dmitry Poletaev According to Intel manual: "If the NMI handler is a virtual-8086 task with an IOPL of less than 3, an IRET instruction issued from the handler generates a general-prote

Re: [Qemu-devel] [QESTION] target-i386/kvm: vmx realization

2016-05-27 Thread Dmitry Poletaev
kvm script prints almost different traces. Anyway, it is nice tools for futher debugging. May be you could give some more advises? Thank you. 26.05.2016, 13:09, "Paolo Bonzini" : > On 26/05/2016 11:55, Dmitry Poletaev wrote: >>  kvm_mmu_page_fault goes to nonpaging_page_fa

[Qemu-devel] [QESTION] target-i386/kvm: vmx realization

2016-05-26 Thread Dmitry Poletaev
Hello. In my diploma project I'm trying to add VMX to qemu. It is first vmx incarnation, without ept, unrestricted guest and other improvements. It seems working in some way. Virtual Box can execute few hundreds of instructions until crash, but it's tricky for me to build it completely to add s

[Qemu-devel] [PATCH] target-i386/FPU: a misprint in helper_fistll_ST0

2015-07-08 Thread Dmitry Poletaev
There is a misprint in the patch https://lists.gnu.org/archive/html/qemu-devel/2014-11/msg01657.html . It cause errors in guest work. Here is the bugfix. From: Dmitry Poletaev Signed-off-by: Dmitry Poletaev Reported-by: Kirill Batuzov --- target-i386/fpu_helper.c | 2 +- 1 file changed, 1

Re: [Qemu-devel] [PATCH] target-i386/fpu_helper.c: fbld instruction doesn't set minus sign

2014-11-11 Thread Dmitry Poletaev
ping 25.07.2014, 15:48, "Dmitry Poletaev" : > Obviously, there is a misprint in function implementation. > > From: Dmitry Poletaev > Signed-off-by: Dmitry Poletaev > > --- >  target-i386/fpu_helper.c | 2 +- >  1 file changed, 1 insertion(+), 1 deleti

Re: [Qemu-devel] [PATCH] target-i386/FPU: wrong conversion infinity from float80 to int32/int64

2014-11-11 Thread Dmitry Poletaev
From: Dmitry Poletaev Signed-off-by: Dmitry Poletaev --- target-i386/fpu_helper.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/target-i386/fpu_helper.c b/target-i386/fpu_helper.c index ab19b71..fc25a03 100644 --- a/target-i386/fpu_helper.c +++ b

Re: [Qemu-devel] [PATCH] target-i386/FPU: wrong conversion infinity from float80 to int32/int64

2014-10-14 Thread Dmitry Poletaev
What do you mean? 29.07.2014, 23:07, "Richard Henderson" : > On 07/23/2014 05:04 AM, Dmitry Poletaev wrote: >>  +    if (env->fp_status.float_exception_flags & FPUS_IE) { > > Mixing bit masks.  s/FPUS_IE/float_status_invalid/ > > r~

[Qemu-devel] [PATCH] target-i386/fpu_helper.c: fbld instruction doesn't set minus sign

2014-07-25 Thread Dmitry Poletaev
Obviously, there is a misprint in function implementation. From: Dmitry Poletaev Signed-off-by: Dmitry Poletaev --- target-i386/fpu_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/fpu_helper.c b/target-i386/fpu_helper.c index 1b2900d..be1e545 100644

Re: [Qemu-devel] [PATCH] target-i386/FPU: wrong conversion infinity from float80 to int32/int64

2014-07-24 Thread Dmitry Poletaev
23.07.2014, 21:13, "Peter Maydell" : >  On 23 July 2014 16:04, Dmitry Poletaev wrote: >>   I'm understood. So, am I right? >  Pretty much, except it's better to use the accessor functions >  get_float_exception_flags() and set_float_e

Re: [Qemu-devel] [PATCH] target-i386/FPU: wrong conversion infinity from float80 to int32/int64

2014-07-23 Thread Dmitry Poletaev
I'm understood. So, am I right? From: Dmitry Poletaev Signed-off-by: Dmitry Poletaev --- target-i386/fpu_helper.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/target-i386/fpu_helper.c b/target-i386/fpu_helper.c index 1b2900d..c4fdad8 100644

Re: [Qemu-devel] [PATCH] target-i386/FPU: wrong conversion infinity from float80 to int32/int64

2014-07-23 Thread Dmitry Poletaev
14.07.2014, 18:59, "Peter Maydell" : >  Since softfloat's status flags are sticky ... What does it mean?

[Qemu-devel] [PATCH] target-i386/FPU: wrong conversion infinity from float80 to int32/int64

2014-07-14 Thread Dmitry Poletaev
ording to tcg tests), but I am not shure it doesn't breaks anything. From: Dmitry Poletaev Signed-off-by: Dmitry Poletaev --- fpu/softfloat.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 9274ebf..580c322 100644 --- a/fp

[Qemu-devel] [PATCH] target-i386: fix handling of ZF in btx instructions

2014-05-06 Thread Dmitry Poletaev
after btx instructions. Signed-off-by: Dmitry Poletaev diff --git a/target-i386/cc_helper.c b/target-i386/cc_helper.c index 05dd12b..272e2f1 100644 --- a/target-i386/cc_helper.c +++ b/target-i386/cc_helper.c @@ -168,6 +168,12 @@ target_ulong helper_cc_compute_all(target_ulong dst, target_ulong src1

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-04-28 Thread Dmitry Poletaev
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 a

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 det

[Qemu-devel] [PATCH] improve emulation correctness

2014-04-25 Thread poletaev
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 diff --git a/target-i386/shift_helper_template.h b/target

[Qemu-devel] [PATCH] improve emulation correctness

2014-04-25 Thread Dmitry Poletaev
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 diff --git a/target-i386/shift_helper_template.h b/target