mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-10 05:09:01 +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
@@ -76,10 +76,8 @@ struct pci_vdev {
|
||||
/* The bar info of the virtual PCI device. */
|
||||
struct pci_bar bar[PCI_BAR_COUNT];
|
||||
|
||||
#ifndef CONFIG_PARTITION_MODE
|
||||
struct pci_msi msi;
|
||||
struct pci_msix msix;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct pci_addr_info {
|
||||
@@ -96,9 +94,9 @@ struct acrn_vpci {
|
||||
};
|
||||
|
||||
int32_t partition_mode_vpci_init(const struct acrn_vm *vm);
|
||||
void partition_mode_cfgread(struct acrn_vpci *vpci, union pci_bdf vbdf,
|
||||
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(struct acrn_vpci *vpci, union pci_bdf vbdf,
|
||||
void partition_mode_cfgwrite(const struct acrn_vpci *vpci, union pci_bdf vbdf,
|
||||
uint32_t offset, uint32_t bytes, uint32_t val);
|
||||
void partition_mode_vpci_deinit(const struct acrn_vm *vm);
|
||||
|
||||
|
Reference in New Issue
Block a user