From 66f71bee8fb80c388c1a71e6776815472081b663 Mon Sep 17 00:00:00 2001 From: Takuya Yoshikawa Date: Fri, 5 Feb 2010 17:52:46 +0900 Subject: [PATCH] --- yaml --- r: 186053 b: refs/heads/master c: 1976d2d2c91246a37fcb8246b811de735aa6e9a4 h: refs/heads/master i: 186051: fbbec314d87940a86a89c4b75162689c0c86a7d7 v: v3 --- [refs] | 2 +- trunk/arch/x86/kvm/x86.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 85bf499a3904..dbcab9edb5ee 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6316e1c8c6af6ccb55ff8564231710660608f46c +refs/heads/master: 1976d2d2c91246a37fcb8246b811de735aa6e9a4 diff --git a/trunk/arch/x86/kvm/x86.c b/trunk/arch/x86/kvm/x86.c index c91007f81660..bd3161c6daed 100644 --- a/trunk/arch/x86/kvm/x86.c +++ b/trunk/arch/x86/kvm/x86.c @@ -3551,8 +3551,10 @@ int kvm_emulate_pio(struct kvm_vcpu *vcpu, int in, int size, unsigned port) trace_kvm_pio(vcpu->run->io.direction == KVM_EXIT_IO_OUT, port, size, 1); - val = kvm_register_read(vcpu, VCPU_REGS_RAX); - memcpy(vcpu->arch.pio_data, &val, 4); + if (!vcpu->arch.pio.in) { + val = kvm_register_read(vcpu, VCPU_REGS_RAX); + memcpy(vcpu->arch.pio_data, &val, 4); + } if (!kernel_pio(vcpu, vcpu->arch.pio_data)) { complete_pio(vcpu);