mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-03 12:49:45 +00:00
When PCIe does Conventinal Reset or FLR, almost PCIe configurations and states will lost. So we should save the configurations and states before do the reset and restore them after the reset. This was done well by BIOS or Guest now. However, ACRN will trap these access and handle them properly for security. Almost of these configurations and states will be written to physical configuration space at last except for BAR values for now. So we should do the restore for BAR values. One way is to do restore after one type reset is detected. This will be too complex. Another way is to do the restore when BIOS or guest tries to write the Command Register. This could work because: 1. The I/O Space Enable bit and Memory Space Enable bits in Command Register will reset to zero. 2. Before BIOS or guest wants to enable these bits, the BAR couldn't be accessed. 3. So we could restore the BAR values before enable these bits if reset is detected. Tracked-On: #3475 Signed-off-by: Li Fei1 <fei1.li@intel.com> |
||
---|---|---|
.. | ||
pci.c |