aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index c91007f81660..bd3161c6daed 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3551,8 +3551,10 @@ int kvm_emulate_pio(struct kvm_vcpu *vcpu, int in, int size, unsigned port)
3551 trace_kvm_pio(vcpu->run->io.direction == KVM_EXIT_IO_OUT, port, 3551 trace_kvm_pio(vcpu->run->io.direction == KVM_EXIT_IO_OUT, port,
3552 size, 1); 3552 size, 1);
3553 3553
3554 val = kvm_register_read(vcpu, VCPU_REGS_RAX); 3554 if (!vcpu->arch.pio.in) {
3555 memcpy(vcpu->arch.pio_data, &val, 4); 3555 val = kvm_register_read(vcpu, VCPU_REGS_RAX);
3556 memcpy(vcpu->arch.pio_data, &val, 4);
3557 }
3556 3558
3557 if (!kernel_pio(vcpu, vcpu->arch.pio_data)) { 3559 if (!kernel_pio(vcpu, vcpu->arch.pio_data)) {
3558 complete_pio(vcpu); 3560 complete_pio(vcpu);