mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-07 03:40:27 +00:00
HV: predefine pci vbar's base address for pre-launched VMs in vm_config
For pre-launched VMs, currently we set all vbars to 0s initially in bar emulation code, guest OS will reprogram the bars when it sees the bars are uninited (0s). We consider this is not the right solution, change to populate the vbars (to non zero valid pci hole address) based on the vbar base addresses predefined in vm_config. Store a pointer to acrn_vm_pci_ptdev_config in struct pci_vdev Tracked-On: #3022 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
4cdaa519a0
commit
73cff9ef08
@@ -68,6 +68,7 @@ struct acrn_vm_os_config {
|
||||
struct acrn_vm_pci_ptdev_config {
|
||||
union pci_bdf vbdf; /* virtual BDF of PCI PT device */
|
||||
union pci_bdf pbdf; /* physical BDF of PCI PT device */
|
||||
uint64_t vbar[PCI_BAR_COUNT]; /* vbar base address of PCI PT device */
|
||||
} __aligned(8);
|
||||
|
||||
struct acrn_vm_config {
|
||||
|
@@ -78,6 +78,9 @@ struct pci_vdev {
|
||||
|
||||
struct pci_msi msi;
|
||||
struct pci_msix msix;
|
||||
|
||||
/* Pointer to corresponding PCI PT device's vm_config */
|
||||
struct acrn_vm_pci_ptdev_config *ptdev_config;
|
||||
};
|
||||
|
||||
struct pci_addr_info {
|
||||
|
Reference in New Issue
Block a user