mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 18:14:53 +00:00
HV: unify the sharing_mode_cfgread and partition_mode_cfgread code
Put the cfgread code in read_cfg() for both sos and pre-launched VMs, and remove sharing_mode_cfgread() and partition_mode_cfgread(). Rename functions used by read_cfg(): vhostbridge_cfgread --> vhostbridge_read_cfg vdev_pt_cfgread --> vdev_pt_read_cfg vmsi_cfgread --> vmsi_read_cfg vmsix_cfgread --> vmsix_read_cfg Tracked-On: #3056 Signed-off-by: dongshen <dongsheng.x.zhang@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com> Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
19af3bc8aa
commit
7635a68f38
@@ -84,23 +84,23 @@ static inline bool is_hostbridge(const 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_read_cfg(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 deinit_vhostbridge(__unused const struct pci_vdev *vdev);
|
||||
|
||||
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_read_cfg(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 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_read_cfg(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 deinit_vmsi(const 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);
|
||||
int32_t vmsix_read_cfg(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 deinit_vmsix(const struct pci_vdev *vdev);
|
||||
|
||||
@@ -111,13 +111,9 @@ 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);
|
||||
|
||||
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 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,
|
||||
uint32_t offset, uint32_t bytes, uint32_t val);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user