From: Paolo Bonzini Date: Fri, 22 Oct 2021 12:01:36 +0000 (-0400) Subject: KVM: x86: wean fast IN from emulator_pio_in X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=dc7a4bfde507ffe1d8bef49aba1322f1d20c2cb3;p=linux.git KVM: x86: wean fast IN from emulator_pio_in Use __emulator_pio_in() directly for fast PIO instead of bouncing through emulator_pio_in() now that __emulator_pio_in() fills "val" when handling in-kernel PIO. vcpu->arch.pio.count is guaranteed to be '0', so this a pure nop. emulator_pio_in_emulated is now the last caller of emulator_pio_in. No functional change intended. Signed-off-by: Paolo Bonzini --- diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 716ae5c926878..b824ffc63b172 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -8886,7 +8886,7 @@ static int kvm_fast_pio_in(struct kvm_vcpu *vcpu, int size, /* For size less than 4 we merge, else we zero extend */ val = (size < 4) ? kvm_rax_read(vcpu) : 0; - ret = emulator_pio_in(vcpu, size, port, &val, 1); + ret = __emulator_pio_in(vcpu, size, port, &val, 1); if (ret) { kvm_rax_write(vcpu, val); return ret;