title: how does vfio handle shared gsi with other device?
body: <p>I'm a little confused about how resamplefd handle shared GSI.</p>
  <p>assume i have a virtual pci device with gsi 10, and a passthroughed dev, also have gsi 10, now, let's see the problem:</p>
  <ol>
  <li>physical device assert an irq, <em><strong>vfio_intx_handler</strong></em> is called, the handler signal the irqfd, then <em><strong>irqfd_inject</strong></em> is called, <em><strong>kvm_set_irq(KVM_IRQFD_RESAMPLE, 10, 1)</strong></em></li>
  <li>somehow, virtual dev in qemu also called <em><strong>pci_irq_assert</strong></em>, this would led to <em><strong>kvm_set_irq(KVM_USERSPACE, 10, 1)</strong></em></li>
  <li>kvm inject this gsi(10) to guest by manipulate VMCS</li>
  <li>guest process the interrupt for virtual dev</li>
  <li>guest write eoi</li>
  <li>resampler_ack is called, which would call <em><strong>kvm_set_irq(KVM_IRQFD_RESAMPLE, 10, 0)</strong></em></li>
  </ol>
  <p>so, are we lost an irq inject from physical dev because it's acked by a virtual dev?</p>