The patches does not compile because vcpu->ioregion_ctx is missing a len field. arch/x86/kvm/x86.c: In function ‘complete_ioregion_fast_pio’: arch/x86/kvm/x86.c:9680:58: error: ‘struct <anonymous>’ has no member named ‘len’ 9680 | memcpy(&val, vcpu->ioregion_ctx.val, vcpu->ioregion_ctx.len); | ^ Gcc8 was also unhappy that the function would have no return values for cases. --- arch/x86/kvm/x86.c | 1 + virt/kvm/ioregion.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 7dc1b80170f1..73205619cdd3 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -9709,6 +9709,7 @@ static int complete_ioregion_io(struct kvm_vcpu *vcpu) return complete_ioregion_mmio(vcpu); if (vcpu->arch.pio.count) return complete_ioregion_pio(vcpu); + return 0; } #endif /* CONFIG_KVM_IOREGION */ diff --git a/virt/kvm/ioregion.c b/virt/kvm/ioregion.c index d53e3d1cd2ff..e0a52b2a56df 100644 --- a/virt/kvm/ioregion.c +++ b/virt/kvm/ioregion.c @@ -311,6 +311,7 @@ get_ioregion_list(struct kvm *kvm, enum kvm_bus bus_idx) return &kvm->ioregions_mmio; if (bus_idx == KVM_PIO_BUS) return &kvm->ioregions_pio; + return NULL; } /* check for not overlapping case and reverse */ -- 2.32.0