HV: refine acrn_mmiodev data structure

1. add a name field to indicate what the MMIO Device is.
2. add two more MMIO resource to the acrn_mmiodev data structure.

Tracked-On: #6366
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Signed-off-by: Fei Li <fei1.li@intel.com>
This commit is contained in:
Fei Li
2021-08-06 10:11:34 +08:00
committed by wenlingz
parent 54fe6f900b
commit f81b39225c
7 changed files with 76 additions and 47 deletions

View File

@@ -139,7 +139,7 @@ void register_vgpio_handler(struct acrn_vm *vm, const struct acrn_mmiodev *mmiod
gpa_start = mmiodev->user_vm_pa + (P2SB_BASE_GPIO_PORT_ID << P2SB_PORTID_SHIFT);
gpio_pcr_sz = P2SB_PCR_SPACE_SIZE_PER_AGENT * P2SB_MAX_GPIO_COMMUNITIES;
gpa_end = gpa_start + gpio_pcr_sz;
base_hpa = mmiodev->service_vm_pa + (P2SB_BASE_GPIO_PORT_ID << P2SB_PORTID_SHIFT);
base_hpa = mmiodev->host_pa + (P2SB_BASE_GPIO_PORT_ID << P2SB_PORTID_SHIFT);
/* emulate MMIO access to the GPIO private configuration space registers */
set_paging_supervisor((uint64_t)hpa2hva(base_hpa), gpio_pcr_sz);