mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 17:27:53 +00:00
hv: vpci: define PCI CONFIG_ADDRESS Register as its physical layout
Refine PCI CONFIG_ADDRESS Register definition as its physical layout. In this case, we could read/write PCI CONFIG_ADDRESS Register atomically. Tracked-On: #3475 Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
@@ -101,15 +101,19 @@ struct pci_vdev {
|
||||
struct pci_vdev *new_owner;
|
||||
};
|
||||
|
||||
struct pci_addr_info {
|
||||
union pci_bdf cached_bdf;
|
||||
uint32_t cached_reg;
|
||||
bool cached_enable;
|
||||
union pci_cfg_addr_reg {
|
||||
uint32_t value;
|
||||
struct {
|
||||
uint32_t reg_num : 8; /* BITs 0-7, Register Number (BITs 0-1, always reserve to 0) */
|
||||
uint32_t bdf : 16; /* BITs 8-23, BDF Number */
|
||||
uint32_t resv : 7; /* BITs 24-30, Reserved */
|
||||
uint32_t enable : 1; /* BITs 31, Enable bit */
|
||||
} bits;
|
||||
};
|
||||
|
||||
struct acrn_vpci {
|
||||
struct acrn_vm *vm;
|
||||
struct pci_addr_info addr_info;
|
||||
union pci_cfg_addr_reg addr;
|
||||
uint32_t pci_vdev_cnt;
|
||||
struct pci_vdev pci_vdevs[CONFIG_MAX_PCI_DEV_NUM];
|
||||
};
|
||||
|
Reference in New Issue
Block a user