mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 18:14:53 +00:00
HV: remove all CONFIG_PARTITION_MODE from dm/vpci code
Instead of using CONFIG_PARTITION_MODE at compile time to compile in and call the partition mode/sharing mode specific functions, always compile in all sharing mode and partition code, then calling the corresponding functions dynamically based on vm type (PRE_LAUNCHED_VM and SOS_VM) at runtime. Some misra c fix: Add @pre for functions Add const to function parameters Add ASSERT in pci_cfgdata_io_read and pci_cfgdata_io_write Tracked-On: #2534 Signed-off-by: dongshen <dongsheng.x.zhang@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
691468a361
commit
c6a60dd29c
@@ -137,7 +137,10 @@ void partition_mode_vpci_deinit(const struct acrn_vm *vm)
|
||||
}
|
||||
}
|
||||
|
||||
void partition_mode_cfgread(struct acrn_vpci *vpci, union pci_bdf vbdf,
|
||||
/**
|
||||
* @pre vpci != NULL
|
||||
*/
|
||||
void partition_mode_cfgread(const struct acrn_vpci *vpci, union pci_bdf vbdf,
|
||||
uint32_t offset, uint32_t bytes, uint32_t *val)
|
||||
{
|
||||
struct pci_vdev *vdev = pci_find_vdev_by_vbdf(vpci, vbdf);
|
||||
@@ -156,7 +159,10 @@ void partition_mode_cfgread(struct acrn_vpci *vpci, union pci_bdf vbdf,
|
||||
}
|
||||
}
|
||||
|
||||
void partition_mode_cfgwrite(struct acrn_vpci *vpci, union pci_bdf vbdf,
|
||||
/**
|
||||
* @pre vpci != NULL
|
||||
*/
|
||||
void partition_mode_cfgwrite(const struct acrn_vpci *vpci, union pci_bdf vbdf,
|
||||
uint32_t offset, uint32_t bytes, uint32_t val)
|
||||
{
|
||||
struct pci_vdev *vdev = pci_find_vdev_by_vbdf(vpci, vbdf);
|
||||
|
||||
Reference in New Issue
Block a user