HV: unify the sharing_mode_cfgwrite and partition_mode_cfgwrite code

Put the cfgwrite code in write_cfg() for both sos and pre-launched VMs, and
remove sharing_mode_cfgwrite() and partition_mode_cfgwrite().

Rename functions used by write_cfg():
 vhostbridge_cfgwrite --> vhostbridge_write_cfg
 vdev_pt_cfgwrite --> vdev_pt_write_cfg
 vmsi_cfgwrite --> vmsi_write_cfg
 vmsix_cfgwrite --> vmsix_write_cfg

Fix @pre for functions

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:56:13 -07:00
committed by ACRN System Integration
parent 7635a68f38
commit b957802164
6 changed files with 26 additions and 47 deletions

View File

@@ -131,7 +131,10 @@ int32_t vmsi_read_cfg(const struct pci_vdev *vdev, uint32_t offset, uint32_t byt
return ret;
}
int32_t vmsi_cfgwrite(struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t val)
/**
* @pre vdev != NULL
*/
int32_t vmsi_write_cfg(struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t val)
{
bool message_changed = false;
bool enable;