diff options
author | Shuo Liu <shuo.a.liu@intel.com> | 2021-02-07 11:10:34 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-02-09 10:58:19 +0100 |
commit | c7cf8d27244f2ccdde30c79eb6314c943bbeac28 (patch) | |
tree | 7ec521a1887a0d458b0f6fdf5a242d5e0151a8fc /drivers/virt/acrn/acrn_drv.h | |
parent | ce011e1363a1fe43de0ca05abc394022ee4fefeb (diff) |
virt: acrn: Introduce interrupt injection interfaces
ACRN userspace need to inject virtual interrupts into a User VM in
devices emulation.
HSM needs provide interfaces to do so.
Introduce following interrupt injection interfaces:
ioctl ACRN_IOCTL_SET_IRQLINE:
Pass data from userspace to the hypervisor, and inform the hypervisor
to inject a virtual IOAPIC GSI interrupt to a User VM.
ioctl ACRN_IOCTL_INJECT_MSI:
Pass data struct acrn_msi_entry from userspace to the hypervisor, and
inform the hypervisor to inject a virtual MSI to a User VM.
ioctl ACRN_IOCTL_VM_INTR_MONITOR:
Set a 4-Kbyte aligned shared page for statistics information of
interrupts of a 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: Zhi Wang <zhi.a.wang@intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuo Liu <shuo.a.liu@intel.com>
Link: https://lore.kernel.org/r/20210207031040.49576-13-shuo.a.liu@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/virt/acrn/acrn_drv.h')
-rw-r--r-- | drivers/virt/acrn/acrn_drv.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/virt/acrn/acrn_drv.h b/drivers/virt/acrn/acrn_drv.h index 6c92a505fa20..068f0be769f6 100644 --- a/drivers/virt/acrn/acrn_drv.h +++ b/drivers/virt/acrn/acrn_drv.h @@ -155,6 +155,7 @@ extern rwlock_t acrn_vm_list_lock; * @ioreq_buf: I/O request shared buffer * @ioreq_page: The page of the I/O request shared buffer * @pci_conf_addr: Address of a PCI configuration access emulation + * @monitor_page: Page of interrupt statistics of User VM */ struct acrn_vm { struct list_head list; @@ -170,6 +171,7 @@ struct acrn_vm { struct acrn_io_request_buffer *ioreq_buf; struct page *ioreq_page; u32 pci_conf_addr; + struct page *monitor_page; }; struct acrn_vm *acrn_vm_create(struct acrn_vm *vm, @@ -196,4 +198,6 @@ struct acrn_ioreq_client *acrn_ioreq_client_create(struct acrn_vm *vm, const char *name); void acrn_ioreq_client_destroy(struct acrn_ioreq_client *client); +int acrn_msi_inject(struct acrn_vm *vm, u64 msi_addr, u64 msi_data); + #endif /* __ACRN_HSM_DRV_H */ |