mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 18:14:53 +00:00
hv: add the support of vector remapping for pre-launched VMs
For pre-launched VMs MSI/MSI-x configuration writes are not intercepted by ACRN. It is pass-thru and interrupts land in ACRN and the guest vector is injected into the VM's vLAPIC. With this patch, ACRN intercepts MSI/MSI-x config writes and take the code path to remap interrupt vector/APIC ID as it does for SOS/UOS. Tracked-On: #2879 Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
committed by
Eddie Dong
parent
c4ec7ac358
commit
5b795a3312
@@ -67,21 +67,29 @@ static inline void pci_vdev_write_cfg_u32(struct pci_vdev *vdev, uint32_t offset
|
||||
vdev->cfgdata.data_32[offset >> 2U] = val;
|
||||
}
|
||||
|
||||
/**
|
||||
* @pre vdev != NULL
|
||||
*/
|
||||
static inline bool has_msix_cap(const struct pci_vdev *vdev)
|
||||
{
|
||||
return (vdev->msix.capoff != 0U);
|
||||
}
|
||||
|
||||
void vdev_hostbridge_init(struct pci_vdev *vdev);
|
||||
int32_t vdev_hostbridge_cfgread(const struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t *val);
|
||||
int32_t vdev_hostbridge_cfgwrite(struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t val);
|
||||
void vdev_hostbridge_deinit(__unused const struct pci_vdev *vdev);
|
||||
|
||||
void vdev_pt_init(const struct pci_vdev *vdev);
|
||||
int32_t vdev_pt_cfgread(const struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t *val);
|
||||
int32_t vdev_pt_cfgwrite(struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t val);
|
||||
void vdev_pt_deinit(const struct pci_vdev *vdev);
|
||||
|
||||
void vmsi_init(struct pci_vdev *vdev);
|
||||
int32_t vmsi_cfgread(const struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t *val);
|
||||
int32_t vmsi_cfgwrite(struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t val);
|
||||
void vmsi_deinit(const struct pci_vdev *vdev);
|
||||
void vmsix_init(struct pci_vdev *vdev);
|
||||
void vdev_pt_remap_msix_table_bar(struct pci_vdev *vdev);
|
||||
int32_t vmsix_table_mmio_access_handler(struct io_request *io_req, void *handler_private_data);
|
||||
int32_t vmsix_cfgread(const struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t *val);
|
||||
int32_t vmsix_cfgwrite(struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t val);
|
||||
void vmsix_deinit(const struct pci_vdev *vdev);
|
||||
|
||||
Reference in New Issue
Block a user