mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 01:07:57 +00:00
Fix: HV: VM OS failed to assign new address to pci-vuart BARs
When wrong BAR address is set for pci-vuart, OS may assign a new BAR address to it. Pci-vuart BAR can't be reprogrammed, for its wrong fixed value. That can may because pci_vbar.fixed and pci_vbar.type has overlap in abstraction, pci_vbar.fixed has a confusing name, pci_vbar.type has PCIBAR_MEM64HI which is not really a type of pci BARs. So replace pci_vbar.type with pci_vbar.is_mem64hi, and change pci_vbar.fixed to an union type with new name pci_vbar.bar_type. Tracked-On: #5491 Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
This commit is contained in:
@@ -38,11 +38,11 @@
|
||||
#define VDEV_LIST_HASHSIZE (1U << VDEV_LIST_HASHBITS)
|
||||
|
||||
struct pci_vbar {
|
||||
enum pci_bar_type type;
|
||||
bool is_mem64hi;;
|
||||
uint64_t size; /* BAR size */
|
||||
uint64_t base_gpa; /* BAR guest physical address */
|
||||
uint64_t base_hpa; /* BAR host physical address */
|
||||
uint32_t fixed; /* BAR fix memory type encoding */
|
||||
union pci_bar_type bar_type;
|
||||
uint32_t mask; /* BAR size mask */
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user