mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-12-06 12:21:07 +00:00
In previous codes, the bridge is owned by hypervsior if there is pre-launched VM configured. This can cause bug, e.g. the net card behind the bridge cannot get IP because the write to bridge's command register to set BusMaster bit is ignored. This patch is to refine the codes to make the bridge be managed by Service VM if the device behind the bridge is not assigned to pre-launched VM. Furthermore, it adds the parent device into struct pci_pdev to construct PCI hierarchy. Tracked-On: #8849 Signed-off-by: Yi Sun <yi.y.sun@intel.com>
19 lines
414 B
C
19 lines
414 B
C
/*
|
|
* Copyright (C) 2019-2022 Intel Corporation.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef PCI_DEV_H_
|
|
#define PCI_DEV_H_
|
|
|
|
#include <asm/vm_config.h>
|
|
|
|
extern struct acrn_vm_pci_dev_config sos_pci_devs[CONFIG_MAX_PCI_DEV_NUM];
|
|
|
|
struct pci_pdev;
|
|
struct acrn_vm_pci_dev_config *init_one_dev_config(struct pci_pdev *pdev);
|
|
bool allocate_to_prelaunched_vm(struct pci_pdev *pdev);
|
|
|
|
#endif /* PCI_DEV_H_ */
|