On 25/08/2016 11:12, Wanpeng Li wrote: >> > >> > ioctl when? interrupt kind >> > ------------------------------------------------------------------------ >> > KVM_INTERRUPT i8259 in userspace EXTINT >> > KVM_SET_GSI_ROUTING (always) IOAPIC >> > KVM_SIGNAL_MSI (always) MSI >> > KVM_SET_GSI_ROUTING (always) MSI >> > KVM_IRQFD any that can use KVM_SET_GSI_ROUTING >> > >> > After KVM_SET_GSI_ROUTING, the host invokes another ioctl on the VM > MSI routing is also set by KVM_SET_GSI_ROUTING,though MSI/MSI-X > doesn't associated with GSI, this is intended to save a KVM API, > right? In addition, kvm_send_userspace_msi() which is called in > KVM_SIGNAL_MSI path set MSI routing entry again, No, kvm_send_userspace_msi simply converts the struct used by userspace (struct kvm_msi) into the one used by the kernel (struct kvm_kernel_irq_routing_entry). I saw there are > patches which will update gsi routing after changed MSI-X > configuration(https://patchwork.kernel.org/patch/6827431/) > , so why set MSI routing entry again during send MSI? KVM_SIGNAL_MSI does not need a previous KVM_SET_GSI_ROUTING, but if userspace wants it can use both. Note that you've linked a patch for lkvm, not Linux or QEMU. Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html