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:
dongshen
2019-05-14 15:36:21 -07:00
committed by ACRN System Integration
parent 19af3bc8aa
commit 7635a68f38
6 changed files with 47 additions and 51 deletions

View File

@@ -158,7 +158,10 @@ static int32_t vmsix_remap_one_entry(const struct pci_vdev *vdev, uint32_t index
return ret;
}
int32_t vmsix_cfgread(const struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t *val)
/**
* @pre vdev != NULL
*/
int32_t vmsix_read_cfg(const struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t *val)
{
int32_t ret = -ENODEV;
/* For PIO access, we emulate Capability Structures only */