KVM: x86: move all vcpu->arch.pio* setup in emulator_pio_in_out()
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 22 Oct 2021 12:07:19 +0000 (08:07 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 24 Jun 2022 16:53:50 +0000 (12:53 -0400)
commit30d583fd4e1ecafa8642f9f74e102876b4aeb733
treeb510b3c479fd61387424940804f2b50f87877e9c
parent35ab3b77a0ae76246dd2666d4f8190c824392fb4
KVM: x86: move all vcpu->arch.pio* setup in emulator_pio_in_out()

For now, this is basically an excuse to add back the void* argument to
the function, while removing some knowledge of vcpu->arch.pio* from
its callers.  The WARN that vcpu->arch.pio.count is zero is also
extended to OUT operations.

The vcpu->arch.pio* fields still need to be filled even when the PIO is
handled in-kernel as __emulator_pio_in() is always followed by
complete_emulator_pio_in().  But after fixing that, it will be possible to
to only populate the vcpu->arch.pio* fields on userspace exits.

No functional change intended.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/trace.h
arch/x86/kvm/x86.c