public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Fix kernel pio emulation mistake
@ 2009-03-19  7:06 Dong, Eddie
  2009-03-19  9:35 ` Avi Kivity
  0 siblings, 1 reply; 4+ messages in thread
From: Dong, Eddie @ 2009-03-19  7:06 UTC (permalink / raw)
  To: kvm@vger.kernel.org, Avi Kivity; +Cc: Dong, Eddie

[-- Attachment #1: Type: text/plain, Size: 786 bytes --]

Kernel pio emulation return value is mistakenly checked, fortuantely it is not hit yet for normal OS bootup :(


Signed-off-by: Eddie Dong <Eddie.dong@linux.intel.com>



commit 98d3dc8b67ba0bc7f494de3ade8f2b5cfcadaeb4
Author: root <root@eddie-wb.localdomain>
Date:   Thu Mar 19 15:44:39 2009 +0800

    fix a bug when kernel PIO is emulated.

diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c
index ca91749..0edd2e7 100644
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -1838,7 +1838,7 @@ special_insn:
 		io_dir_in = 0;
 	do_io:	if (kvm_emulate_pio(ctxt->vcpu, NULL, io_dir_in,
 				   (c->d & ByteOp) ? 1 : c->op_bytes,
-				   port) != 0) {
+				   port) == 0) {
 			c->eip = saved_eip;
 			goto cannot_emulate;
 		}

[-- Attachment #2: pio.patch --]
[-- Type: application/octet-stream, Size: 591 bytes --]

commit 98d3dc8b67ba0bc7f494de3ade8f2b5cfcadaeb4
Author: root <root@eddie-wb.localdomain>
Date:   Thu Mar 19 15:44:39 2009 +0800

    fix a bug when kernel PIO is emulated.

diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c
index ca91749..0edd2e7 100644
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -1838,7 +1838,7 @@ special_insn:
 		io_dir_in = 0;
 	do_io:	if (kvm_emulate_pio(ctxt->vcpu, NULL, io_dir_in,
 				   (c->d & ByteOp) ? 1 : c->op_bytes,
-				   port) != 0) {
+				   port) == 0) {
 			c->eip = saved_eip;
 			goto cannot_emulate;
 		}

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-03-22  9:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-19  7:06 Fix kernel pio emulation mistake Dong, Eddie
2009-03-19  9:35 ` Avi Kivity
2009-03-20  9:07   ` Dong, Eddie
2009-03-22  9:09     ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox