Skip to content
  • Shuo Liu's avatar
    virt: acrn: Introduce interfaces for PCI device passthrough · ce011e13
    Shuo Liu authored
    
    
    PCI device passthrough enables an OS in a virtual machine to directly
    access a PCI device in the host. It promises almost the native
    performance, which is required in performance-critical scenarios of
    ACRN.
    
    HSM provides the following ioctls:
     - Assign - ACRN_IOCTL_ASSIGN_PCIDEV
       Pass data struct acrn_pcidev from userspace to the hypervisor, and
       inform the hypervisor to assign a PCI device to a User VM.
    
     - De-assign - ACRN_IOCTL_DEASSIGN_PCIDEV
       Pass data struct acrn_pcidev from userspace to the hypervisor, and
       inform the hypervisor to de-assign a PCI device from a User VM.
    
     - Set a interrupt of a passthrough device - ACRN_IOCTL_SET_PTDEV_INTR
       Pass data struct acrn_ptdev_irq from userspace to the hypervisor,
       and inform the hypervisor to map a INTx interrupt of passthrough
       device of User VM.
    
     - Reset passthrough device interrupt - ACRN_IOCTL_RESET_PTDEV_INTR
       Pass data struct acrn_ptdev_irq from userspace to the hypervisor,
       and inform the hypervisor to unmap a INTx interrupt of passthrough
       device of User VM.
    
    Cc: Zhi Wang <zhi.a.wang@intel.com>
    Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
    Cc: Yu Wang <yu1.wang@intel.com>
    Cc: Reinette Chatre <reinette.chatre@intel.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Reviewed-by: default avatarZhi Wang <zhi.a.wang@intel.com>
    Reviewed-by: default avatarReinette Chatre <reinette.chatre@intel.com>
    Signed-off-by: default avatarShuo Liu <shuo.a.liu@intel.com>
    Link: https://lore.kernel.org/r/20210207031040.49576-12-shuo.a.liu@intel.com
    
    
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    ce011e13