kvm: detect assigned device via irqbypass manager
authorZhu Lingshan <lingshan.zhu@intel.com>
Fri, 31 Jul 2020 06:55:29 +0000 (14:55 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 5 Aug 2020 15:08:42 +0000 (11:08 -0400)
commit2edd9cb79fb31b0907c6e0cdce2824780cf9b153
tree32655aee80ac569e3973ae69d256d2067a709687
parent265a0ad8731dc04fccb76cd1abf5a85a9359e62e
kvm: detect assigned device via irqbypass manager

vDPA devices has dedicated backed hardware like
passthrough-ed devices. Then it is possible to setup irq
offloading to vCPU for vDPA devices. Thus this patch tries to
manipulated assigned device counters by
kvm_arch_start/end_assignment() in irqbypass manager, so that
assigned devices could be detected in update_pi_irte()

We will increase/decrease the assigned device counter in kvm/x86.
Both vDPA and VFIO would go through this code path.

Only X86 uses these counters and kvm_arch_start/end_assignment(),
so this code path only affect x86 for now.

Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Suggested-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20200731065533.4144-3-lingshan.zhu@intel.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
arch/x86/kvm/x86.c