aboutsummaryrefslogtreecommitdiffstats
path: root/ioport.c
diff options
context:
space:
mode:
Diffstat (limited to 'ioport.c')
-rw-r--r--ioport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ioport.c b/ioport.c
index 8c55a842..263fe50f 100644
--- a/ioport.c
+++ b/ioport.c
@@ -192,7 +192,7 @@ bool kvm__emulate_io(struct kvm_cpu *vcpu, u16 port, void *data, int direction,
while (count--) {
if (direction == KVM_EXIT_IO_IN && ops->io_in)
ret = ops->io_in(entry, vcpu, port, ptr, size);
- else if (ops->io_out)
+ else if (direction == KVM_EXIT_IO_OUT && ops->io_out)
ret = ops->io_out(entry, vcpu, port, ptr, size);
ptr += size;