mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 18:14:53 +00:00
HV: unify the sharing_mode_vpci_init and partition_mode_vpci_init code
Put the init code in init_vdev_for_pdev for both sos and pre-launched VMs, and remove sharing_mode_vpci_init() and partition_mode_vpci_init(). Rename functions used by init_vdev_for_pdev: vhostbridge_init --> init_vhostbridge vmsi_init --> init_vmsi vmsix_init --> init_vmsix Tracked-On: #3056 Signed-off-by: dongshen <dongsheng.x.zhang@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
f873b843de
commit
3a6c63f2d8
@@ -83,7 +83,7 @@ static inline bool is_hostbridge(const struct pci_vdev *vdev)
|
||||
return (vdev->vbdf.value == 0U);
|
||||
}
|
||||
|
||||
void vhostbridge_init(struct pci_vdev *vdev);
|
||||
void init_vhostbridge(struct pci_vdev *vdev);
|
||||
int32_t vhostbridge_cfgread(const struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t *val);
|
||||
int32_t vhostbridge_cfgwrite(struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t val);
|
||||
void vhostbridge_deinit(__unused const struct pci_vdev *vdev);
|
||||
@@ -92,11 +92,12 @@ void init_vdev_pt(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 vmsi_init(struct pci_vdev *vdev);
|
||||
void init_vmsi(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 init_vmsix(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);
|
||||
@@ -110,14 +111,12 @@ struct pci_vdev *pci_find_vdev_by_vbdf(const struct acrn_vpci *vpci, union pci_b
|
||||
|
||||
struct pci_vdev *pci_find_vdev_by_pbdf(const struct acrn_vpci *vpci, union pci_bdf pbdf);
|
||||
|
||||
int32_t partition_mode_vpci_init(struct acrn_vm *vm);
|
||||
void partition_mode_cfgread(const struct acrn_vpci *vpci, union pci_bdf vbdf,
|
||||
uint32_t offset, uint32_t bytes, uint32_t *val);
|
||||
void partition_mode_cfgwrite(const struct acrn_vpci *vpci, union pci_bdf vbdf,
|
||||
uint32_t offset, uint32_t bytes, uint32_t val);
|
||||
void partition_mode_vpci_deinit(const struct acrn_vm *vm);
|
||||
|
||||
int32_t sharing_mode_vpci_init(struct acrn_vm *vm);
|
||||
void sharing_mode_cfgread(struct acrn_vpci *vpci, union pci_bdf bdf,
|
||||
uint32_t offset, uint32_t bytes, uint32_t *val);
|
||||
void sharing_mode_cfgwrite(__unused struct acrn_vpci *vpci, union pci_bdf bdf,
|
||||
|
||||
Reference in New Issue
Block a user