Introduce MMIO/PIO dispatch file descriptors (ioregionfd)
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(+)
arch/x86/kvm/x86.c +1 -0
@@ -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 */
virt/kvm/ioregion.c +1 -0
@@ -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 */
Signature · 1 line
2.32.0