hv: vpci: restore PCI BARs when doing PCIe FLR

ACRN hypervisor should trap guest doing PCIe FLR. Besides, it should save some status
before doing the FLR and restore them later, only BARs values for now.
This patch will trap guest Device Capabilities Register write operation if the device
supports PCI Express Capability and check whether it wants to do device FLR. If it does,
call pdev_do_flr to do the job.

Tracked-On: #3465
Signed-off-by: Li Fei1 <fei1.li@intel.com>
This commit is contained in:
Li Fei1
2019-12-19 18:51:19 +08:00
committed by wenlingz
parent 3c2f4509af
commit a90e0f6c84
7 changed files with 77 additions and 3 deletions

View File

@@ -50,6 +50,7 @@ struct hv_timer {
#define CYCLES_PER_MS us_to_ticks(1000U)
void udelay(uint32_t us);
void msleep(uint32_t ms);
/**
* @brief convert us to ticks.