mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-03 04:39:50 +00:00
HV: rename hostbridge related functions
vdev_hostbridge_init --> vhostbridge_init vdev_hostbridge_cfgread --> vhostbridge_cfgread vdev_hostbridge_cfgwrite --> vhostbridge_cfgwrite vdev_hostbridge_deinit --> vhostbridge_deinit Tracked-On: #3056 Signed-off-by: dongshen <dongsheng.x.zhang@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
6c085c1a25
commit
4e2d13bda7
@ -38,7 +38,7 @@
|
||||
#include <pci.h>
|
||||
#include "vpci_priv.h"
|
||||
|
||||
void vdev_hostbridge_init(struct pci_vdev *vdev)
|
||||
void vhostbridge_init(struct pci_vdev *vdev)
|
||||
{
|
||||
/* PCI config space */
|
||||
pci_vdev_write_cfg_u16(vdev, PCIR_VENDOR, (uint16_t)0x8086U);
|
||||
@ -83,11 +83,11 @@ void vdev_hostbridge_init(struct pci_vdev *vdev)
|
||||
pci_vdev_write_cfg_u8(vdev, 0xf7U, (uint8_t)0x1U);
|
||||
}
|
||||
|
||||
void vdev_hostbridge_deinit(__unused const struct pci_vdev *vdev)
|
||||
void vhostbridge_deinit(__unused const struct pci_vdev *vdev)
|
||||
{
|
||||
}
|
||||
|
||||
int32_t vdev_hostbridge_cfgread(const struct pci_vdev *vdev, uint32_t offset,
|
||||
int32_t vhostbridge_cfgread(const struct pci_vdev *vdev, uint32_t offset,
|
||||
uint32_t bytes, uint32_t *val)
|
||||
{
|
||||
*val = pci_vdev_read_cfg(vdev, offset, bytes);
|
||||
@ -95,7 +95,7 @@ int32_t vdev_hostbridge_cfgread(const struct pci_vdev *vdev, uint32_t offset,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t vdev_hostbridge_cfgwrite(struct pci_vdev *vdev, uint32_t offset,
|
||||
int32_t vhostbridge_cfgwrite(struct pci_vdev *vdev, uint32_t offset,
|
||||
uint32_t bytes, uint32_t val)
|
||||
{
|
||||
if (!pci_bar_access(offset)) {
|
||||
|
@ -398,7 +398,7 @@ int32_t partition_mode_vpci_init(struct acrn_vm *vm)
|
||||
vdev->vbdf.value = ptdev_config->vbdf.value;
|
||||
|
||||
if (is_hostbridge(vdev)) {
|
||||
vdev_hostbridge_init(vdev);
|
||||
vhostbridge_init(vdev);
|
||||
} else {
|
||||
partition_mode_pdev_init(vdev, ptdev_config->pbdf);
|
||||
|
||||
@ -424,7 +424,7 @@ void partition_mode_vpci_deinit(const struct acrn_vm *vm)
|
||||
vdev = (struct pci_vdev *) &(vm->vpci.pci_vdevs[i]);
|
||||
|
||||
if (is_hostbridge(vdev)) {
|
||||
vdev_hostbridge_deinit(vdev);
|
||||
vhostbridge_deinit(vdev);
|
||||
} else {
|
||||
remove_vdev_pt_iommu_domain(vdev);
|
||||
|
||||
@ -445,7 +445,7 @@ void partition_mode_cfgread(const struct acrn_vpci *vpci, union pci_bdf vbdf,
|
||||
|
||||
if (vdev != NULL) {
|
||||
if (is_hostbridge(vdev)) {
|
||||
(void)vdev_hostbridge_cfgread(vdev, offset, bytes, val);
|
||||
(void)vhostbridge_cfgread(vdev, offset, bytes, val);
|
||||
} else {
|
||||
if ((vdev_pt_cfgread(vdev, offset, bytes, val) != 0)
|
||||
&& (vmsi_cfgread(vdev, offset, bytes, val) != 0)
|
||||
@ -468,7 +468,7 @@ void partition_mode_cfgwrite(const struct acrn_vpci *vpci, union pci_bdf vbdf,
|
||||
|
||||
if (vdev != NULL) {
|
||||
if (is_hostbridge(vdev)) {
|
||||
(void)vdev_hostbridge_cfgwrite(vdev, offset, bytes, val);
|
||||
(void)vhostbridge_cfgwrite(vdev, offset, bytes, val);
|
||||
} else {
|
||||
if ((vdev_pt_cfgwrite(vdev, offset, bytes, val) != 0)
|
||||
&& (vmsi_cfgwrite(vdev, offset, bytes, val) != 0)
|
||||
|
@ -75,10 +75,10 @@ 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 vhostbridge_init(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);
|
||||
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user