KVM: x86: leave vcpu->arch.pio.count alone in emulator_pio_in_out
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 13 Oct 2021 16:29:42 +0000 (12:29 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 22 Oct 2021 14:02:07 +0000 (10:02 -0400)
commit0d33b1baeb6ca7165d5ed4fdd1a8f969985e35b9
tree84ef4154a0f5b9e7e928c8cacf453fd2c3116406
parentb5998402e3de429b5e5f9bdea08ddf77c5fd661e
KVM: x86: leave vcpu->arch.pio.count alone in emulator_pio_in_out

Currently emulator_pio_in clears vcpu->arch.pio.count twice if
emulator_pio_in_out performs kernel PIO.  Move the clear into
emulator_pio_out where it is actually necessary.

No functional change intended.

Cc: stable@vger.kernel.org
Fixes: 7ed9abfe8e9f ("KVM: SVM: Support string IO operations for an SEV-ES guest")
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c