Signed-off-by: Sheng Yang <sheng@xxxxxxxxxxxxxxx> --- qemu/hw/device-assignment.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c index 9a3104b..d404286 100644 --- a/qemu/hw/device-assignment.c +++ b/qemu/hw/device-assignment.c @@ -595,7 +595,12 @@ static int assign_irq(AssignedDevInfo *adev) if (r && r != -ENXIO) perror("assign_irq: deassign"); } - assigned_irq_data.flags = KVM_DEV_IRQ_HOST_INTX | KVM_DEV_IRQ_GUEST_INTX; + + assigned_irq_data.flags = KVM_DEV_IRQ_GUEST_INTX; + if (dev->cap.available & ASSIGNED_DEVICE_CAP_MSI) + assigned_irq_data.flags |= KVM_DEV_IRQ_HOST_MSI; + else + assigned_irq_data.flags |= KVM_DEV_IRQ_HOST_INTX; #endif r = kvm_assign_irq(kvm_context, &assigned_irq_data); -- 1.5.4.5 -- 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