• S
    KVM: Device assignment framework rework · e56d532f
    Sheng Yang 提交于
    After discussion with Marcelo, we decided to rework device assignment framework
    together. The old problems are kernel logic is unnecessary complex. So Marcelo
    suggest to split it into a more elegant way:
    
    1. Split host IRQ assign and guest IRQ assign. And userspace determine the
    combination. Also discard msi2intx parameter, userspace can specific
    KVM_DEV_IRQ_HOST_MSI | KVM_DEV_IRQ_GUEST_INTX in assigned_irq->flags to
    enable MSI to INTx convertion.
    
    2. Split assign IRQ and deassign IRQ. Import two new ioctls:
    KVM_ASSIGN_DEV_IRQ and KVM_DEASSIGN_DEV_IRQ.
    
    This patch also fixed the reversed _IOR vs _IOW in definition(by deprecated the
    old interface).
    
    [avi: replace homemade bitcount() by hweight_long()]
    Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
    Signed-off-by: NSheng Yang <sheng@linux.intel.com>
    Signed-off-by: NAvi Kivity <avi@redhat.com>
    e56d532f
kvm_host.h 14.9 KB